Skip to content

Commit 866d3fb

Browse files
JamieMasonmhevery
authored andcommitted
$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.
1 parent 70cf0a3 commit 866d3fb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ng/route.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,9 @@ function $RouteProvider(){
263263
* {@link ng.directive:ngView ngView} listens for the directive
264264
* to instantiate the controller and render the view.
265265
*
266+
* @param {Object} angularEvent Synthetic event object.
266267
* @param {Route} current Current route information.
267-
* @param {Route} previous Previous route information.
268+
* @param {Route|Undefined} previous Previous route information, or undefined if current is first route entered.
268269
*/
269270

270271
/**

0 commit comments

Comments
 (0)