[SOLVED] How do we take a string of template code and make a new Blaze.Template with it?

Suppose I have

var spacebars = "<div>{{name}}</div>"

How do I create a new Blaze.Template with it?

Check out this test I’ve found in the Blaze sources:
https://github.com/meteor/meteor/blob/master/packages/blaze/view_tests.js

I’m investigating for something similar, but I guess I will do it with old school preexisting templates. But maybe it helps.

Regards,
Dirk

1 Like

Aah, thanks, it does. It looks like the render function can return the template string. :smiley: