Problem handling UserEventsService in AngularJS (loginError case)


#1

Hi,
the tutorial The Authenticated App With AngularJS + DreamFactory User Management Part Two
shows how to deal with a successful login using

$scope.$on(UserEventsService.login.loginSuccess, function (e, userDataObj) {
  $scope.$parent.currentUser = userDataObj;
  $location.url('/');
});

but I didn’t find the right way to manage UserEventsService.login.loginError

Do you have a snippet regarding this case? Thanks.


#2

Have you reviewed the readme from the user management module?

https://github.com/dreamfactorysoftware/angular_dreamfactory_user_management_module/blob/master/README.md

It covers the namespaced events including loginError: 'user:login:error' but I don’t see an example of handling it. Perhaps someone in the community can contribute that.


#3

Hi Jeffrey, yes I looked at the user management module. I might try again… meanwhile, thanks.