Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app.controller('loginCtrl, function($scope, $location, $http){
- $scope.login = function(){
- var parameter = JSON.stringify({ username: $scope.username, password: $scope.password });
- $http({
- url: 'https://localhost:8443/api/login'
- method: 'POST',
- data: parameter
- }).then(function(response){
- console.log('success: ' + JSON.stringify(response));
- },
- function(response){
- console.log('failed: ' + JSON.stringify(response));
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement