templatesknockout.jsexternalknockout-templating

Using an external Template in KnockoutJS


is it possible to use an external Template in KnockoutJS like this?

<script type="text/html" id="a_template" src="templates/a_template.html">
</script>

I've tried this solution but didn't get it working.


Solution

  • You could also look at:

    https://github.com/ifandelse/Knockout.js-External-Template-Engine