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.
ng-cache is not working for dynamic chunks, since
ngModule.run()
only executes before app bootstrap. so i added thisinjector
method to get$templateCache
for document module and put the template in it same way it does withngModule
.so the all initial load templates will use existing logic since
angular.element(window.document).injector()
isundefined
before bootstrap and it is available for dynamic chunks/modules when loaded after bootstrap.