R
R
Roman Rodionov2016-08-31 12:44:37
JavaScript
Roman Rodionov, 2016-08-31 12:44:37

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

1 answer(s)
B
bromzh, 2016-08-31
@Romashishka

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 question

Ask a Question

731 491 924 answers to any question