iterates through the collection of data items
| method |
template:function(data){
var names = [];
if (data.each)
data.each(function(obj){ names.push(obj.name);});
return names.join(", ");
}
The method function has two parameters:
template:function(data){
var names = [];
if (data.each)
data.each(function(obj, index){
names.push(obj.name);
console.log(index + " is the index of the file")
});
return names.join(", ");
}