Just curious what the best, most appropriate methodology is for external mustache template files. Syntax, loading, rendering etc ... Just started to test on my own but hoping to kick start the process.
Start with a few basic questions:
File extension?: .html vs .mustache vs.foo
File contents for 'some_template.xyz?':
- <script type="type/template id="mySection">
- <ul>
- {{#items}}
- <li>{{item}}
- {{/items}}
- </script>
To render from can?:
- el.html( can.view(root/templates/some_template.xyz, items) );
Is it possible to combine multiple external templates into a single external file and access scripts by id?:
- el.html( can.view(root/templates/some_template.xyz#mySection, items) );
- el.html( can.view(root/templates/some_template.xyz#anotherSection, otherItems) );
So yeah, just looking for a good guide on working with external mustache templates. I can't yet introduce Steal.js, so just looking to see what can.view can do. Thanks!