I saw you can pass parameters to your subroute like so
var mySubRouteInstance = new BooksRouter("books", {locale: "en_US", isVIP: true));
Then retrieve it from the SubRoute like so
initialize: function(options) {
this.locale = options.locale;
this.isVIP = options.isVIP;
}
Now given my subroute, how can I access locale and isVIP from my subroute callback mycallback()?
var BooksRouter = Backbone.SubRoute.extend({
initialize: function(options) {
this.locale = options.locale;
}
routes: {
"myroute" : "mycallback",
},
mycallback: function() {
//###### how can I get the value of locale here??
},
});