backboneboilerplate
backboneboilerplate copied to clipboard
how to router.navigate ?
Hi,
first of all, thanks for your boilerplate !
Maybe I’m thinking wrong, but I haven’t found the way yet to do a proper Backbone.Router.navigate(), since the router object is wrapped in a requirejs module.
My case is to redirect programmatically from a view to another. I could do it with window.location, but it doesn’t sound very smart…
Thanks for any help !
regards.
I remember having this problem. With a bit of luck I found out that Backbone.history.navigate() works just as var router = new Backbone.Router(); router.navigate();
I'd assume you are always including Backbone so a simple Backbone.history.navigate('') should work.
Hi,
thanks for your answer. I’ll try this ASAP !
regards.