Blog post on integrating a login modal into Angular apps

Review review review!!!
The anonymous functions aren't arguments to the service though. I would argue that "this API returns a promise" is probably semantically stronger than "this API take these two named function arguments", considering Promises are a real (native soon!) type that had very well-defined requirements and behaviours.

The advantage of using promise is that they can easily be composed down the chain. For example, if you resolve the promise with the authenticated user (looks like you are doing that) then the route can choose to reject it based on the user type, or resolve it with another AJAX to fetch the required resource which would then be resolved or rejected based on whether this user has access to the particular resource or not.

I come from a stack where everything are promise-based which makes some very composable APIs (especially in the router) so I'm probably biased.

For the second question, a comment in the login handler would probably cut it.

By the way, I am just curious, is it common to have localized controllers (like the login modal controller) modify global states (current user on the root scope) vs doing it in the service here?