Creating a tabulated page with many "partial views" which are just each handlebars template wrapped in <script>
tags. The page is getting a little busy, so I'd like all my templates to live in a folder in web called templates and just include them. The problem is that the template doesn't load on the page when i try to include it but work fine when I put the template right in the script tags.
Here is the script include I'm using:
<script id="referral-summary-template" type="text/x-handlebars-template" src="/templates/referrals/referralSummaryTemplate.hbs"></script>
For reference I tried changing the handlebars file to a js file that just alerted "hello", and that worked fine. Am I just misunderstading what can be a src tag...as in I can only reference JS files?
referralSummaryTemplate.hbs
Just contains the template (html with handlebars templating). I need the template to be in script tags so I can Handlebars.complie()
on click events without having to async get the template.
Thanks.