I'm new to AngularJS and am confused by the documentation regarding event listeners.
The documentation lists the following for the $routeChangeSuccess
event:
$routeChangeSuccess Broadcasted after a route dependencies are resolved. ngView listens for the directive to instantiate the controller and render the view.
Type:
broadcast Target:
root scope
However, no where does it reference any arguments that are passed to the callback function. And yet, most of the examples I've seen here on SO all have a similar callback function listing:
$rootScope.$on("$routeChangeSuccess", function(event, next, current) {
...
});
According to the AngularJS docs, all callbacks have the first argument as the event
. I get that. But where are next
and current
coming from? Where is that listed in any of the documentation?