From 866d3fb5736f71cda567087cdfb6baddbeb43dcc Mon Sep 17 00:00:00 2001 From: Jamie Mason Date: Fri, 15 Mar 2013 09:24:52 +0000 Subject: [PATCH] $routeChangeSuccess documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- src/ng/route.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ng/route.js b/src/ng/route.js index e9b62bee0d1f..587e64a70e90 100644 --- a/src/ng/route.js +++ b/src/ng/route.js @@ -263,8 +263,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. */ /**