diff options
| author | Jamie Mason | 2013-03-15 09:24:52 +0000 | 
|---|---|---|
| committer | Misko Hevery | 2013-03-15 21:02:21 -0700 | 
| commit | df9bff13b2bf8376428cd28fce472aeee07c4bbe (patch) | |
| tree | f661e426904e1b4d52c6525fa5c2ee8b316589a3 | |
| parent | f197e391c1148398825bfd1af8d000d351821c97 (diff) | |
| download | angular.js-df9bff13b2bf8376428cd28fce472aeee07c4bbe.tar.bz2 | |
$routeChangeSuccess documentation
I hope this helps someone, I ran into some issues when following the API as described - handlers of this event receive 3 arguments, not 2.
Although this is mentioned [elsewhere](http://docs.angularjs.org/api/ng.$rootScope.Scope#$on) it's not clear when viewing the docs for this behaviour in isolation. 
The first argument is an Event Object, not the current route. The previous route argument can also be omitted on occasions.
| -rw-r--r-- | src/ng/route.js | 3 | 
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ng/route.js b/src/ng/route.js index 4b5a7c92..e47f8a5a 100644 --- a/src/ng/route.js +++ b/src/ng/route.js @@ -289,8 +289,9 @@ function $RouteProvider(){       * {@link ng.directive:ngView ngView} listens for the directive       * to instantiate the controller and render the view.       * +     * @param {Object} angularEvent Synthetic event object.       * @param {Route} current Current route information. -     * @param {Route} previous Previous route information. +     * @param {Route|Undefined} previous Previous route information, or undefined if current is first route entered.       */      /**  | 
