Reputation: 1469
Is there a built in call to find out the current page, in a bootstrap environment.. I am trying to hide some of the links depending on the page i am on. we have a router as follows;
var AppRouter = Backbone.Router.extend({
routes : {
// Define some URL routes
'login' : 'showLogin',
'main' : 'showMain',
'faq' : 'showFaq
}
Upvotes: 1
Views: 5441
Reputation: 1580
If you're looking for the last route triggered in the router then you can access it using
Backbone.history.fragment
Provided history was started after initializing routers.
Upvotes: 7