Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit f2e8333

Browse files
idanb11Jacob Wenger
authored andcommitted
Fixed incorrect information in code comments for router docs (#899)
1. use $routeChangeError in ngRoute example 2. AccountCtrl won't be initiated in case the route resolve promise is rejected.
1 parent 9881546 commit f2e8333

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/guide/user-auth.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ app.config(["$routeProvider", function($routeProvider) {
322322
// Auth refers to our $firebaseAuth wrapper in the factory below
323323
"currentAuth": ["Auth", function(Auth) {
324324
// $requireSignIn returns a promise so the resolve waits for it to complete
325-
// If the promise is rejected, it will throw a $stateChangeError (see above)
325+
// If the promise is rejected, it will throw a $routeChangeError (see above)
326326
return Auth.$requireSignIn();
327327
}]
328328
}
@@ -336,7 +336,7 @@ app.controller("HomeCtrl", ["currentAuth", function(currentAuth) {
336336

337337
app.controller("AccountCtrl", ["currentAuth", function(currentAuth) {
338338
// currentAuth (provided by resolve) will contain the
339-
// authenticated user or null if not signed in
339+
// authenticated user or throw a $routeChangeError (see above) if not signed in
340340
}]);
341341

342342
app.factory("Auth", ["$firebaseAuth",
@@ -398,7 +398,7 @@ app.controller("HomeCtrl", ["currentAuth", function(currentAuth) {
398398

399399
app.controller("AccountCtrl", ["currentAuth", function(currentAuth) {
400400
// currentAuth (provided by resolve) will contain the
401-
// authenticated user or null if not signed in
401+
// authenticated user or throw a $stateChangeError (see above) if not signed in
402402
}]);
403403

404404
app.factory("Auth", ["$firebaseAuth",

0 commit comments

Comments
 (0)