I am using backbonejs to write a chrome extension for gmail. This extension attaches a widget to a div within an email on gmail.com (like a gmail contextual gadget). To navigate to a particular route, I use
appRouter.navigate('index', {trigger:true, replace: true});
This actually changes the browser location i.e https://mail.google.com/mail/ becomes https://mail.google.com/mail/#index. Is there a way I can disable this? Because my widget should not be messing with the browser location.
I just realized that I should not extend the Backbone.Router.extend. Then I would not messing with window.location.