I have a code snippet here that is functioning as expected, but I am interested in making a slight change. Instead of using the following line:
$(this.el).html(Mustache.render("<h2>{{title}}</h2>", view));
I would like to replace it with:
$(this.el).html(Mustache.render("somePath/myFile.html", view));
Is there a way for me to achieve this?
The part marked with (*) looks something like this:
render: function ()
{
var view = {
response: this.model.title
};
$(this.el).html(Mustache.render("<h2>{{{title}}}</h2>", view)); // it works
$(this.el).html(Mustache.render("myFile.html", view)); // it does not work
},