i have a quite simple backbone router and everything works fine so far. Except when i reload/direct enter the url i.e. http://mydomain.com/#list/50fadc41125b0
I've tried nearly everything now without any positiv results at all.
myRouter = Backbone.Router.extend({
routes: {
"list/:id": "getList",
"*actions": "defaultRoute" // not needed right now
},
getList: function (id) {
console.log ("test");
}
});
i tried it this way as well without any difference
// init router
router = new myRouter;
router.on('route:getList', function (id) {
[...]
});
i have no i idea how to make this work! hopefully someone has an answer for me!
EDIT:
i also start the history
Backbone.history.start();