I created a new app using backbone-generator with --template-framework=mustache, then generated a view and tried to render it:
yo backbone cats --template-framework=mustache
yo backbone:view CatView
I changed the definition of render so that it doesn't try to look at a model, and removed the call to listen to the model in initialize, so I wouldn't need a model for this issue report. Now render is just:
In main.js, I created a single CatView and tried to render it:
var catView = new Cats.Views.CatView({ el: '#theCat' });
catView.render();
This fails, because this.template is just a string, not a function, so it can't be called.
I think we just need to add a call to Mustache.render; I'll see if I can get this fixed.
I created a new app using backbone-generator with
--template-framework=mustache
, then generated a view and tried to render it: yo backbone cats --template-framework=mustache yo backbone:view CatViewI changed the definition of render so that it doesn't try to look at a model, and removed the call to listen to the model in initialize, so I wouldn't need a model for this issue report. Now render is just:
In main.js, I created a single CatView and tried to render it:
This fails, because this.template is just a string, not a function, so it can't be called. I think we just need to add a call to Mustache.render; I'll see if I can get this fixed.