Answer the question
In order to leave comments, you need to log in
What is the best way to store html templates?
For a new spa application, I plan to use angular. I want to store html templates in xml file. When starting the application, load it once, store it in memory and retrieve templates as needed. Is this a good approach? Application size is unlimited.
Answer the question
In order to leave comments, you need to log in
If the first angular, then it is necessary to store in lines.
https://docs.angularjs.org/api/ng/service/$templat...
And there are all sorts of plugins for autoconverting from html to js file with this cache:
https://www.npmjs.com/package/grunt -angular-templates
https://www.npmjs.com/package/gulp-angular-templat...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question