Skip to content

Commit

Permalink
Fixed incorrect information in code comments for router docs (#899)
Browse files Browse the repository at this point in the history
1. use $routeChangeError in ngRoute example
2. AccountCtrl won't be initiated in case the route resolve promise is rejected.
  • Loading branch information
idanb11 authored and Jacob Wenger committed Jan 12, 2017
1 parent 9881546 commit f2e8333
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/guide/user-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ app.config(["$routeProvider", function($routeProvider) {
// Auth refers to our $firebaseAuth wrapper in the factory below
"currentAuth": ["Auth", function(Auth) {
// $requireSignIn returns a promise so the resolve waits for it to complete
// If the promise is rejected, it will throw a $stateChangeError (see above)
// If the promise is rejected, it will throw a $routeChangeError (see above)
return Auth.$requireSignIn();
}]
}
Expand All @@ -336,7 +336,7 @@ app.controller("HomeCtrl", ["currentAuth", function(currentAuth) {

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

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

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

app.factory("Auth", ["$firebaseAuth",
Expand Down

0 comments on commit f2e8333

Please sign in to comment.