Is it possible to move templates to separate files in jsBlocks? On their website there is only an example with embedded template.
Asked
Active
Viewed 105 times
1 Answers
1
Yes. Absolutely. You just have to reference the file using a script tag and provide a custom type so the browser don't interpret it as a JavaScript file.
<script src="myTemplate.bt" type="blocks/template"></script>
myTemplate.bt
<div class="template">{{name}}</div>

astoilkov
- 556
- 1
- 5
- 14