Skip to content

Commit

Permalink
$routeChangeSuccess documentation
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
JamieMason authored and mhevery committed Mar 16, 2013
1 parent 70cf0a3 commit 866d3fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ng/route.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/

/**
Expand Down

0 comments on commit 866d3fb

Please sign in to comment.