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


#1

Suppose I have

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

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


Change between many UI frameworks
#2

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


#3

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