teux / ng-cache-loader

Webpack loader to put HTML partials in the Angular's $templateCache.
83 stars 15 forks source link

added injector to load $templateCache for dynamic chunks. #26

Closed Ja9ad335h closed 8 years ago

Ja9ad335h commented 8 years ago

ng-cache is not working for dynamic chunks, since ngModule.run() only executes before app bootstrap. so i added this injector method to get $templateCache for document module and put the template in it same way it does with ngModule.

so the all initial load templates will use existing logic since angular.element(window.document).injector() is undefined before bootstrap and it is available for dynamic chunks/modules when loaded after bootstrap.