Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var loginFormControllerFunction = function($scope, $log, $location, authenticationService){
- $scope.errorMessage = "";
- $scope.submit = function() {
- $scope.errorMessage = "";
- $scope.loginSuccessful = false;
- authenticationService.authenticate($scope.credentials.userName, $scope.credentials.password).then(
- function(user) {
- var token = user.token;
- //TODO: Receive token. Keep this guy logged for sometime.
- $scope.loginSuccessful = true;
- //TODO 2: Navigate to the main page.
- },
- function(errorMessage) {
- $scope.errorMessage = errorMessage;
- //TODO 3: remove zis from here!!!!
- //alert (errorMessage);
- }
- );
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement