Permalink
Browse files

Updated the link hijack code to use Backbone.history.navigate

  • Loading branch information...
1 parent 6a5c84d commit f10c889a480bef98c7fdb1b33ae375081b56e2c3 @tbranyen committed Mar 17, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 app/main.js
View
@@ -71,11 +71,10 @@ function(namespace, $, Backbone, Example) {
// refresh.
evt.preventDefault();
- // This uses the default router defined above, and not any routers
- // that may be placed in modules. To have this work globally (at the
- // cost of losing all route events) you can change the following line
- // to: Backbone.history.navigate(href, true);
- app.router.navigate(href, true);
+ // `Backbone.history.navigate` is sufficient for all Routers and will
+ // trigger the correct events. The Router's internal `navigate` method
+ // calls this anyways.
+ Backbone.history.navigate(href, true);
}
});

0 comments on commit f10c889

Please sign in to comment.