From 24b41bb7c6f715dabe23e987cdb3503b43d41154 Mon Sep 17 00:00:00 2001 From: idan Date: Thu, 12 Jan 2017 23:51:10 +0700 Subject: [PATCH] some doc updates 1. use $routeChangeError in ngRoute example 2. AccountCtrl won't be initiated in case the route resolve promise is rejected. --- docs/guide/user-auth.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/guide/user-auth.md b/docs/guide/user-auth.md index b8dac5e5..d127f8f4 100644 --- a/docs/guide/user-auth.md +++ b/docs/guide/user-auth.md @@ -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(); }] } @@ -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", @@ -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",