You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for a great project! I really want to continue to use it, but I can't get my head around how to expose the different templates so I can execute them programmatically. I followed your examples, but I can only get them to self-execute. I know this is probably not the correct forum to ask this, but I thought more people might be interested so I thought what the heck.
My thought was to do like this.
In the build.js file
var compiledTemplates = {};
compiledTemplates.myTemplate1 = function (data, selector) {
var tpl = require('./myTemplate1.vash');
document.querySelector(selector).innerHTML = tpl(data);
}
compiledTemplates.myTemplate2 = function (data, selector) {
var tpl = require('./myTemplate2.vash');
document.querySelector(selector).innerHTML = tpl(data);
}
Thank you for a great project! I really want to continue to use it, but I can't get my head around how to expose the different templates so I can execute them programmatically. I followed your examples, but I can only get them to self-execute. I know this is probably not the correct forum to ask this, but I thought more people might be interested so I thought what the heck.
My thought was to do like this.
In the build.js file
Compile the template
And the calling it like this:
The text was updated successfully, but these errors were encountered: