I've got a very simple routes. When I click my < a href="#content_ft"> for the first time, the route function matched(ft) will be called. But here comes the question, I click the < a href="#content_ft"> for the second time, the route function(ft) cannot be called.
I think it is because the url in the browser is still *"www.mysite.com/index.html#content_ft"*, backbone think I do not visit a new anchor, so the routes won't work. But what I need is the effect like refreshing the page.I need the route function ft can be called when I click the < a href="#content_ft"> even if the url does not change.
Any help is appreciated!
Here is my Router:
app.HomeRouter = Backbone.Router.extend({
routes : {
"content_ft" : "ft",
"content_view_diag" : "view_diag",
},
ft : function() {
//do something()
},
view_diag : function(){
//do something
},
});
app.router = new app.HomeRouter();
Backbone.history.start();