From 268e49118a090bb9bfdb9872849f07159d64fdb9 Mon Sep 17 00:00:00 2001 From: gandhimathi Date: Fri, 22 Dec 2017 13:47:05 +0530 Subject: [PATCH] course details changes done --- Apollo/assets/js/controllers/loginCtrl.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Apollo/assets/js/controllers/loginCtrl.js b/Apollo/assets/js/controllers/loginCtrl.js index cc30944f..d3b94c3c 100755 --- a/Apollo/assets/js/controllers/loginCtrl.js +++ b/Apollo/assets/js/controllers/loginCtrl.js @@ -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");