Skip to content

Instantly share code, notes, and snippets.

@ganeshgawali79
Created July 24, 2016 06:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ganeshgawali79/3907dce41d662c30617ab93eccd2c9d5 to your computer and use it in GitHub Desktop.
Save ganeshgawali79/3907dce41d662c30617ab93eccd2c9d5 to your computer and use it in GitHub Desktop.
Angular code to request server for signin
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