Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. app.controller('loginCtrl, function($scope, $location, $http){
  2. $scope.login = function(){
  3. var parameter = JSON.stringify({ username: $scope.username, password: $scope.password });
  4. $http({
  5. url: 'https://localhost:8443/api/login'
  6. method: 'POST',
  7. data: parameter
  8. }).then(function(response){
  9. console.log('success: ' + JSON.stringify(response));
  10. },
  11. function(response){
  12. console.log('failed: ' + JSON.stringify(response));
  13. });
  14. }
  15. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement