Closed gregblass closed 8 years ago
FROM Handlebars docs:
var context = {title: "My New Post", body: "This is my first post!"};
var html = template(context);
HandlebarsTemplates['notification']
is like template above, so
HandlebarsTemplates['notification']({ title: "My New Post" });
Got it working. Thanks!
Just wondering, I see a lot of activity here about rendering handlebars templates on the server. Is this merged into master and possible at the moment?
Forgive me but I just don't understand something really basic here. If I'm in a view, and I want to just output a handlebars template, the documentation states:
"You can then invoke the resulting template in your application's JavaScript HandlebarsTemplates'contacts/new';
So I'm trying this in my view:
But that is just outputting that as text in the browser and not my actual template.
Also what is context?
Just trying to output the content of my template file when rendering the page for the first time.