d4f / backbone-highway

Routing Backbone with style \o/
MIT License
19 stars 5 forks source link

Force the current route to re-execute #19

Closed ghost closed 8 years ago

ghost commented 8 years ago

Add an option to the Backbone.Highway.go() method so that it can re-execute (trigger) the route if it's the same.

For example, you redirect the user to a profile route that is defined with the name user.profile like this

Backbone.Highway.go('user.profile');

Re-executing the method with a force parameter should re-execute the route.

Backbone.Highway.go('user.profile', { force: true });