Unable to get external templates working.
chrisfromthelc opened this issue · 2 comments
chrisfromthelc commented
I'm having a bit of trouble trying to get external templates working.
I can take the same exact code, and enclose in <script type="text/html" id="template"> tags per the instructions, and it works just fine. However, if I move that code out to an external template, I get nothing (not even the template's tags) in the main HTML container.
Relevent jQuery:
$.getJSON( devicesURL, function(result) {
$.each(result, function( index, value ) {
$(".main").loadTemplate("templates/test.html",result);
});
});
Template:
<div data-content="name"></div>
<div data-content="restURL"></div>
Screenshot of the folder structure:

What am I missing?
codepb commented
Do you get any errors in the console when they don't load?
codepb commented
Closing as no response