aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJamie Mason2013-03-15 09:24:52 +0000
committerMisko Hevery2013-03-15 21:02:14 -0700
commit866d3fb5736f71cda567087cdfb6baddbeb43dcc (patch)
tree4d07a2362903881fb949c579820cdf0aadb2ae7f
parent70cf0a389f7ed60edc248e302a5201b283c0a213 (diff)
downloadangular.js-866d3fb5736f71cda567087cdfb6baddbeb43dcc.tar.bz2
$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.
-rw-r--r--src/ng/route.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ng/route.js b/src/ng/route.js
index e9b62bee..587e64a7 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.
*/
/**