mustache.renderΒΆ

This command renders a view using mustache.

Arguments:

view (string)
Location of the view. Use resolve(..) to resolve a view.
model (object)
Model that is passed to the view.

Example:

var view = resolve('view/fruit.html');

var result = execute('mustache.render', {
    view: view,
    model: {
        fruits: [
            {
                name: 'Apple',
                color: 'Red'
            },
            {
                name: 'Pear',
                color: 'Green'
            }
        ]
    }
});