course details changes done

This commit is contained in:
gandhimathi 2017-12-22 13:47:05 +05:30
parent bdc3833b66
commit 268e49118a

View File

@ -50,7 +50,7 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
$http(req).then(function (response) {
if (response.data.loginStatus == true) {
$scope.responseData = response.data.details;
// {"loginStatus":true,"details":{"MobileNumber":"9876543210","ListCode":"R004","ID":"1"}}
/*
* After logined user details store to local client detail
*/
@ -64,7 +64,14 @@ app.controller('loginCtrl', ["$scope", "$http", "API_POINTS", "$state", '$rootSc
}
ipCookie('cookiechk', $scope.localStore, { expires: 21 });
localStorage.setItem('localObj', JSON.stringify($scope.localStore));
$state.go('app.dashboard');
if($scope.responseData.ListCode=='R001'){
$state.go('app.studentView');
}
else{
$state.go('app.dashboard');
}
} else {
// alert(response.data.message);
swal("Warning!", response.data.message, "warning");