Forum Discussion
1 Reply
Sort By
- RobertScaliseQrew CadetI just started working with Mustache and I also get a Mustache not defined message if I do not include it. This works when referencing
https://cdnjs.cloudflare.com/ajax/libs/mustache.js/2.3.0/mustache.js
<script>
var view = {
name : "Joe",
occupation : "Web Developer"
};
function loadtemp(){
var output = Mustache.render("{{name}} is a {{occupation}}", view);
document.getElementById('person').innerHTML = output;
}
</script>
<body onload="loadtemp()" >
<p id="person"></p>
</body>