You cannot use jade in the browser (well, you probably can technically, but it is not so often used with the base, not the underline). There you will use underline patterns. The documents on the _.template page show that you can evaluate javascript and use the _.each method to loop through the attributes of the model array.
This will look like the one shown in your render function. You want to cache the template function as an attribute of your view for efficiency, but I have it built in here for simplicity. Suppose, for example, you have a Car model with a list of drivers as an array of driver names.
var template = "<% _.each(model.drivers, function(name) { %> <li><%= name %></li> <% }); %>"; return _.template(template, this);
Note that you will need to provide evaluate syntax in the settings of your template, as this example includes both the interpolation style ( <%= ) and the evaluation style ( <% ) of the template markup. Currently, you just have a mustache style interpolation, and that’s not enough.
Peter Lyons
source share