appirio-tech-ng-auth
v4.2.6
Published
[](http://badge.fury.io/gh/appirio-tech%2Fng-auth) [](https://travis-ci.org/appirio-tech/ng-auth) [
onSuccess = ->
console.log 'log in successful'
onError = ->
console.log 'log in failed'
$scope.login = ->
loginOptions =
username: $scope.username
password: $scope.password
error: onError
success: onSuccess
AuthService.login loginOptionsCheck if user is logged in
isLoggedIn = AuthService.isLoggedInGet current user
controller = -> ($scope, UserV3Service)
vm = this
scope.$watch UserV3Service.getCurrentUser, ->
user = UserV3Service.getCurrentUser()
vm.user = user if user