Skip to content

Instantly share code, notes, and snippets.

@ganeshgawali79
ganeshgawali79 / public.js.index.js
Created July 24, 2016 06:37
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";
}