Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Commit df9bff1

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 f197e39 commit df9bff1

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
@@ -289,8 +289,9 @@ function $RouteProvider(){
289289
* {@link ng.directive:ngView ngView} listens for the directive
290290
* to instantiate the controller and render the view.
291291
*
292+
* @param {Object} angularEvent Synthetic event object.
292293
* @param {Route} current Current route information.
293-
* @param {Route} previous Previous route information.
294+
* @param {Route|Undefined} previous Previous route information, or undefined if current is first route entered.
294295
*/
295296

296297
/**

0 commit comments

Comments
 (0)