I have this template script
<script id="some-template" type="text/x-handlebars-template">
{{#users}}
{username}
{email}
</script>
I want to out-source it to a file called "user_template.js" which will look like this:
{{#users}}
{username}
{email}
and make in the main index.html this link:
<script id="some-template" type="text/x-handlebars-template" src="user_template.js"></script>
The problem is - it doesn't work - how do I do it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…