Reputation: 1876
i am using knockout.js and asp.netmvc. While i am familiar with knockout.js i am not sure how to externalize the templates. So,
1.)How to externalize knockout templates 2.)Is there a way to bundle the templates just like we bundle css and JS in MVC4
Upvotes: 2
Views: 1302
Reputation: 14677
With Razor as your view engine, you could create partial views for your templates and then include them with Html.Partial()
:
<script type="text/html" id="person-template">
@Html.Partial("person")
</script>
Upvotes: 3