Moe-js v0.3

The model Variable

Data passed to the template is available as the special model variable inside the template:

eg: Suppose the template was invoked like so:

template({ title: "This is the title" });

Inside the template, the model properties would be accessed as follows:


(Unlike Handlebars, {{title}} won't work, you must specify {{model.title}})

Subscribe for more like this. No spam, just fun tech stuff :)

Or, find me on Twitter: @toptensoftware.