* multiple times. If it's already started, we just pick up the
* existing startup promise.
*
- * 2. Since we are returning a promise, whose success handler
- * updates a value within our scope, we do not have to manually
- * call $scope.$apply() in the handler to update the DOM.. When
- * the promise is resolved, another $digest() loop will pick up
- * our changes to $scope.username and apply them to the UI.
+ * 2. We are updating the $scope asynchronously, but since it's
+ * done inside a promise resolver, another $digest() loop will
+ * run and pick up our changes. No $scope.$apply() needed.
*/
- return egStartup.go().then(
+ egStartup.go().then(
function() {
- // login page will not have a cached
+ // login page will not have a cached user
if (!egAuth.user()) return;
$scope.username = egAuth.user().usrname();