From df9bff13b2bf8376428cd28fce472aeee07c4bbe Mon Sep 17 00:00:00 2001 From: Jamie Mason Date: Fri, 15 Mar 2013 09:24:52 +0000 Subject: $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. --- src/ng/route.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/ng') 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. */ /** -- cgit v1.2.3