marcoslin / angularAMD

Facilitate use of RequireJS in AngularJS
http://marcoslin.github.io/angularAMD
MIT License
734 stars 171 forks source link

Create a `.config` method to allow configuration change in lazy loaded modules #71

Closed marcoslin closed 10 years ago

marcoslin commented 10 years ago

Packages like ui-router allow runtime change of $stateProvider but it requires caching of $injector during the app.config phase. As angularAMD already does this, exposing this as .config method allow for post bootstrap .config call. Here is a sample implementation of lazy loading of $state from ui-router:

http://bl.ocks.org/marcoslin/b59cfa9a9a44bde04f9f