knockout.js - How to deal with many templates in knockout? -
while working knockout use templates lot. because working on single page application, amount of templates using becoming bigger , bigger.
my main html started this:
<!-- id's knockout binding --> <span id='...'>...</span> <span id='...'>...</span> .... <span id='...'>...</span> <!-- templates --> <script type="text/html" id="template_1">...</script> <script type="text/html" id="template_2">...</script> ... <script type="text/html" id="template_100">...</script>
nonetheless works expected, intimidated huge amount of templates, being loaded in beginning.
so there best-practice regarding issue, or how people experience knockout dealing it?
external templates better instead of having templates in 1 file.by having external templates can call them on demand rather loading @ time.so there many options available external templates. more information check out external templates
Comments
Post a Comment