3 ms·
I like the Template element, but what I'd really like is a way to escape out of JavaScript and html directly to my JavaScript views. That'd be more convenient
by mzarate06 14y ago
I like the Template element, but what I'd really like is a way to escape out of JavaScript and html directly to my JavaScript views. That'd be more convenient than splitting client side view development across the JavaScript logic and html templates that reside somewhere else.
Plus, I think that'd offer caching benefits vs. having to send templates across the wire every time.
- Encosia 14y agoI keep most of my templates in separate .htm files and load them via XHR for a handful of reasons, including caching as you mentioned. Works great. It would be nice if the new template element had built-in support for that (e.g. a src attribute and maybe some sort of control for loading immediately, after document ready, and/or on demand).
- bbvup 14y agoYou want AngularJS