| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | 3× 2× 1× 1× 1× | class ResolveService {
login (UserAPI, $q) {
if (UserAPI.isLoggedIn() !== true) {
return UserAPI.checkLoggedInStatus()
.catch(_error);
}
function _error () {
return $q.reject('requireLogin');
}
}
}
ResolveService.prototype.login.$inject = ['UserAPI', '$q'];
export default ResolveService;
|