window.router = new RouterModel(extended from backbone router)
I can't figure out what its purpose is in an program I'm looking at.
Would I do this to change the router anytime I need to?
window.router = new RouterModel(extended from backbone router)
I can't figure out what its purpose is in an program I'm looking at.
Would I do this to change the router anytime I need to?
It assigns an object of RouterModel to the global variable router.
Would I do this to change the router anytime I need to?
Yes, if you want to change the global router variable.