Add cancelLogin method on LoginService.

This commit is contained in:
Alexis Lahouze 2017-06-11 09:17:42 +02:00
parent 3d5f211824
commit eba176c000

View File

@ -64,8 +64,13 @@ var loginModule = angular.module('accountant.login', [
});
};
var cancelLogin = function () {
// FIXME Alexis Lahouze 2017-06-11 Redirect to error page.
};
return {
'login': login
'login': login,
'cancelLogin': cancelLogin
};
})
@ -142,6 +147,8 @@ var loginModule = angular.module('accountant.login', [
.run(function($rootScope, LoginService) {
var onAuthLoginRequired = $rootScope.$on('event:auth-loginRequired', LoginService.login);
var onAuthLoginCancelled = $rootScope.$on('event:auth-loginCancelled', LoginService.cancelLogin);
$rootScope.$on('$destroy', function() {
onAuthLoginRequired = angular.noop();
});