first time i call an url in angular application, the engine gets all templates (external files).I suppose it retrives them for caching. Is there a method to avoid this, and call only the interested template?
thank you
first time i call an url in angular application, the engine gets all templates (external files).I suppose it retrives them for caching. Is there a method to avoid this, and call only the interested template?
thank you
The best way is to use a build tool such as Grunt or Gulp and automate your build process. You can install a package that will load all your templates via a set path, convert them into angular template files and concattenate them into one file. Then your angular app will only have to load one file and they are loaded into memory straight away.
Grunt plugin: https://github.com/ericclemmons/grunt-angular-templates
Gulp plugin: https://github.com/miickel/gulp-angular-templatecache
If you don't want to use a build tool you can also embed the templates inline and refer to them via a unique I.D.