Why is it considered bad practice to call trigger: true in the navigate function of backbone.js?

There seems to be some confusion about what Router#navigate does exactly, I think. Without any options set it will update the URL to the fragment provided. E.g. router.navigate(‘todo/4/edit’) will update the URL to #todo/4 AND will create a browser history entry for that URL. No route handlers are run. However, setting trigger:true will update the … Read more

navigate route with querystring

You need to add another route with that expecting parameter : routes: { ‘posts?foo=:foo’ : ‘showPosts’, ‘posts’: ‘showPosts’ }, showPosts: function (foo) { if(typeof foo != ‘undefined’){ // foo parameters was passed } test = true; } update You could define the general route to return all the query string and then parse it in … Read more

tech