Commit 22d3192382f19183626d81fdfca84af0b8ba1355
1 parent
cf6180b0da
Exists in
master
login next page
Showing
2 changed files
with
6 additions
and
5 deletions
Show diff stats
app/views/login/login.controller.js
1 | 'use strict'; | 1 | 'use strict'; |
2 | 2 | ||
3 | //Load controller | 3 | //Load controller |
4 | angular.module('inspinia') | 4 | angular.module('inspinia') |
5 | 5 | ||
6 | .controller('LoginController', function ($scope, LoginService) { | 6 | .controller('LoginController', function ($scope, $state, LoginService) { |
7 | 7 | ||
8 | $scope.user = {}; | 8 | $scope.user = {}; |
9 | $scope.userData = function(){ | 9 | $scope.userData = function(){ |
10 | 10 | ||
11 | LoginService.loginUser($scope.user).then(function(result) { | 11 | // LoginService.loginUser($scope.user).then(function(result) { |
12 | console.log(result) | 12 | // console.log(result) |
13 | 13 | ||
14 | }) | 14 | // }) |
15 | $state.go('index.dashboard'); | ||
15 | } | 16 | } |
16 | 17 | ||
17 | }); | 18 | }); |
app/views/login/login.html
1 | <div class="middle-box text-center loginscreen animated fadeInDown"> | 1 | <div class="middle-box text-center loginscreen animated fadeInDown"> |
2 | <div> | 2 | <div> |
3 | <div> | 3 | <div> |
4 | <h1 class="logo-name">IN+</h1> | 4 | <h1 class="logo-name">IN+</h1> |
5 | </div> | 5 | </div> |
6 | <h3>Welcome to IN+</h3> | 6 | <h3>Welcome to IN+</h3> |
7 | <p>Perfectly designed and precisely prepared admin theme with over 50 pages with extra new web app views. | 7 | <p>Perfectly designed and precisely prepared admin theme with over 50 pages with extra new web app views. |
8 | </p> | 8 | </p> |
9 | <p>Login in. To see it in action.</p> | 9 | <p>Login in. To see it in action.</p> |
10 | <form class="m-t" role="form" action="#"> | 10 | <form class="m-t" role="form" action="#"> |
11 | <div class="form-group"> | 11 | <div class="form-group"> |
12 | <input type="email" class="form-control" placeholder="Username" required="" ng-model="user.email"> | 12 | <input type="email" class="form-control" placeholder="Username" required="" ng-model="user.email"> |
13 | </div> | 13 | </div> |
14 | <div class="form-group"> | 14 | <div class="form-group"> |
15 | <input type="password" class="form-control" placeholder="Password" required="" ng-model="user.password"> | 15 | <input type="password" class="form-control" placeholder="Password" required="" ng-model="user.password"> |
16 | </div> | 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 | <a ui-sref="forgot_password"><small>Forgot password?</small></a> | 19 | <a ui-sref="forgot_password"><small>Forgot password?</small></a> |
20 | <p class="text-muted text-center"><small>Do not have an account?</small></p> | 20 | <p class="text-muted text-center"><small>Do not have an account?</small></p> |
21 | <a class="btn btn-sm btn-white btn-block" ui-sref="register">Create an account</a> | 21 | <a class="btn btn-sm btn-white btn-block" ui-sref="register">Create an account</a> |
22 | </form> | 22 | </form> |
23 | <p class="m-t"> <small>Inspinia we app framework base on Bootstrap 3 © 2014</small> </p> | 23 | <p class="m-t"> <small>Inspinia we app framework base on Bootstrap 3 © 2014</small> </p> |
24 | </div> | 24 | </div> |
25 | </div> | 25 | </div> |