Created
July 24, 2016 06:37
-
-
Save ganeshgawali79/3907dce41d662c30617ab93eccd2c9d5 to your computer and use it in GitHub Desktop.
Angular code to request server for signin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app1=angular.module('app1',[]); | |
app1.controller('cntrl1',function($scope,$http,$window){ | |
$scope.signin= function () { | |
$http.post('/signin',$scope.emp).success(function(response){ | |
if(response.message === 'success'){ | |
$window.location.href='./ibm_homepage.html'; | |
} | |
else{ | |
$scope.message="username/password is wrong"; | |
} | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment