{{ .. }}
), which Mustache and Handlebars derive their names from (hint: turn them sideways to see the similarity).Mustache.render
function takes two parameters: the Mustache template, as well as a view object that contains the data and code needed to render the template. In this case we are replacing name
and a power
variables with simple strings, but it’s possible to do much more. For example loop over an array, or make use of a special rendering function that uses the current view as its view argument. <ul>
list iterator which wraps each item in <li>
. You can read more about block expressions here.<% .. %>
).