Commit 22d3192382f19183626d81fdfca84af0b8ba1355

Authored by Rishav
1 parent cf6180b0da
Exists in master

login next page

app/views/login/login.controller.js
... ... @@ -3,15 +3,16 @@
3 3 //Load controller
4 4 angular.module('inspinia')
5 5  
6   - .controller('LoginController', function ($scope, LoginService) {
  6 + .controller('LoginController', function ($scope, $state, LoginService) {
7 7  
8 8 $scope.user = {};
9 9 $scope.userData = function(){
10 10  
11   - LoginService.loginUser($scope.user).then(function(result) {
12   - console.log(result)
  11 + // LoginService.loginUser($scope.user).then(function(result) {
  12 + // console.log(result)
13 13  
14   - })
  14 + // })
  15 + $state.go('index.dashboard');
15 16 }
16 17  
17 18 });
18 19 \ No newline at end of file
... ...
app/views/login/login.html
... ... @@ -14,7 +14,7 @@
14 14 <div class="form-group">
15 15 <input type="password" class="form-control" placeholder="Password" required="" ng-model="user.password">
16 16 </div>
17   - <button type="submit" class="btn btn-primary block full-width m-b">Login</button>
  17 + <button type="submit" class="btn btn-primary block full-width m-b" ng-click="userData()">Login</button>
18 18  
19 19 <a ui-sref="forgot_password"><small>Forgot password?</small></a>
20 20 <p class="text-muted text-center"><small>Do not have an account?</small></p>
... ...