I have a mustache.js template defined like so:
<script id="wishlist_template" type="text/html">
<h1>aaa{{ title }}</h1>
</script>
I’ve tried to use Mustache directly, then ICanHaz.js, neither seem to be doing the job. If I pass in:
console.log( ich.wishlist_template('{title: "blah blah"}') );
All I see in the console log is:
<h1>aaa</h1>
I’ve also tried it with a true object, the one I’m trying to render (the above code is my attempt at figuring out the problem).
'{title: "blah blah"}'is not a valid object literal, but rather just a string. Instead it should be{title: "blah blah"}without the quotes. See the article A Survey of the JavaScript Programming Language for a great explanation of object literals.