I am new to backbone.js, and have a query. Say my user is at http://www.foo.com/#about, and clicks on a link to go to http://www.foo.com/#profile. But I don’t want to take him to #profile if he hasn’t logged in. So, if he hasn’t logged in, the bookmark #about shouldn’t change. Unable to know how to achieve this. Would need help. Thanks.
Share
I suggest you to bind a click event into the profile link and add the logic there, also use
Backbone.Routerto manage the navigation history. Something like: