What is the difference between use as this.initialize();
within router.js in BackboneJS and
require(['router'],function(Router) {
router = Router;
router.intialize();
});
How to get same instances?
Can any one help me, Thanks in advance
EDIT:
I want to implement code coverage Unit Testing (Jasmine.js 1.3.1).
For this, I need to pass router (exactly same instance what I have when running application without code coverage tool) instance to my Jasmine spec's .js file.
If it is not possible, to get same instance during specs execution, Kindly advise me How to get the instance using different approach.
If you need any clarification in this transition, please let me know.
Thanks in advance.