ng-inline
ng-inline copied to clipboard
Add a fallback for loading files, and cache them.
There is one issue remaining:
When loading files on an ng-repeat, template will be called multiples time and fire multiple http requests. The only workaround I can see for this is to pre-load the template we will use into ng-repeat. This way the will only be loaded once. This is not needed for normal / singles ng-inline.
The idea for ng-inline
is that you must put provide them in the cache, so indeed you should pre-load the template via <script type="text/ng-template" />
(or any other method). Loading them externally defeats somewhat the goal of fast compilation, though I can see the use-case. I'll have a look too.