Backbone.Router is not yet before and after the event.
version 0.5.3 supports the following router events ( all events are here )
"route: [name]" (router) - when one of the routes of the router matches.
I'm not sure what release it will be for, but a general route event is being developed, github trunk commit # 419 has this function, but it has not yet been released in the new version
any previously reported problems (ideas) for the event before this, check out the github problem on this here.
Thus, the previous event does not exist yet, the after event will happen after a while, if you really need the after event, there is a way that you can put it in yourself, instead of binding to the βallβ event, it captures all events, including all events "route: routeename". then just split the name of the event, and if it starts with a route, you will have a general route event. (this can, of course, be deleted and changed if the after event is fired in one of the base releases)
this.bind('all', function (trigger, args) { var routeData = trigger.split(":"); if (routeData[0] === "route") {
source share