I am in the following situation.
I am using requireJs to loads module and I don\'t want to use global variables.
The main.js is responsible to load the router.
Subapp can raise events which router handles rather than having an explicit dependency on router