I have an application which needs to be able to dynamically add directives/filters/services/controllers. The functionality I need is akin to loading a Mac OS X Widget / Windows Gadget. To my knowledge there are 3 ways of doing this :
Include them in the initial stack -- This isn't realistic for me, as the stack will be too big, and we may be pulling these functionalities from remote locations on demand
Hack a bit, and add them to the application -- I have this working, but it's messy when you have to recompile. An adapted version of Loading an AngularJS controller dynamically
Bootstrap another app with has all the needed functionality -- Probably the most correct way of doing this...
Right now, I'm sticking to the third option.
These asynchronously added apps don't need routes. What's the best way to write these modules, so I don't have to configure $routeProvider? What do I use instead of ng-view?
Or do I have to just stick using $routeProvider.otherwise()
?
Thanks,
Max.