For most javascript template libraries, templating takes place in two phases.
- ( HTML) . " ", . .
- ( HTML), "" , . HTML.
.
var templateFunction = _.template("<p>Your <%- part %> is so <%- description %></p>");
var html1 = templateFunction({part: "nose", description: "big"});
var html2 = templateFunction({part: "cat", description: "fat"});
, JST, jade . " " - , . , , , : {model: myModel};. - <%= model.get("displayName") %>.