I'm creating my first application that uses the Backbonejs router.
I'm curious, is it possible to define a route that will fire for every url segment except one?
In my case, I don't want this callback to fire if the url is http://www.example.com/login
, but I do want it to fire for
My router looks like this:
var SuiteRouter = Backbone.Router.extend({
// ################################ Defined Routes ################################
routes: {
"": "landing", //Suite primary page, initiates menus and other suite-wide items, initiated everywhere except login
"login": "login"
},
// ########################### Route Callbacks ################################
landing: function() {
console.log(arguments);
console.log('landing');
},
login: function() {
console.log(arguments); //<--- nothing useful, empty array
console.log('login');
}
});