Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (function () {
- angular
- .module('app.controllers')
- .controller('AuthController', AuthController);
- AuthController.$inject = ['$state', 'UserAuthService', 'GlobalSettings'];
- function AuthController ($state, UserAuthService, GlobalSettings)
- {
- var vm = this;
- vm.fields = {
- username: '',
- password: ''
- };
- vm.tryToSingIn = tryToSingIn;
- function tryToSingIn () {
- UserAuthService.login(vm.fields)
- .then(function() {
- $state.go(GlobalSettings.HOMEPAGE)
- }, function () {
- });
- }
- }
- })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement