If you try to use the code specified in the Usage > Loading a template from disk section, it fails with a Cannot call method 'render' of undefined message on node 0.8.18.
It seems that trying to run a method on a variable being defined in this case fails, and the template must be instantiated by kiwi beforehand, as such:
// proposed fix
var template = new kiwi.Template();
template.loadFile('template.kiwi', function onLoaded(err) {
template.render({ name: "Kiwi" }, function onRendered(err, rendered) {
console.log('Rendered template is: ' + rendered);
});
});
If you try to use the code specified in the Usage > Loading a template from disk section, it fails with a
Cannot call method 'render' of undefined
message on node 0.8.18.It seems that trying to run a method on a variable being defined in this case fails, and the
template
must be instantiated by kiwi beforehand, as such: