node.js - hogan.js how to debug a variable -
i'm familiar javascript console.log(), , php_dump() functions allows see what's in variable, want know if there function in hogan.js let inspect content of variable.
add method data , include @ loctation need inspect scope
var data = { ... // vars, ... inspect: function () { return function () { console.log(this); } } }; template.render(data);
anywhere use {{inspect}} log current render context in console
Comments
Post a Comment