Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to router.navigate ? #34

Open
gorghoa opened this issue Nov 22, 2012 · 2 comments
Open

how to router.navigate ? #34

gorghoa opened this issue Nov 22, 2012 · 2 comments

Comments

@gorghoa
Copy link

gorghoa commented Nov 22, 2012

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.

@thomasdavis
Copy link
Owner

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.

@gorghoa
Copy link
Author

gorghoa commented Nov 22, 2012

Hi,

thanks for your answer. I’ll try this ASAP !

regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants