-2
我在我的集閤中做了一個抓取,我做了一個console.log(),它工作正常,但是當我設置爲我的模板時不顯示值。在骨幹上取指不填充我的模板
在我看來是:
var reposCollection = new Sice.Collections.RepositoryList();
reposCollection.fetch();
this.$el.html(this.template({collection: reposCollection.models}));
我的模板是:
<% _.each(collection, function(repos) { %>
<tr>
<td><%= repos.attributes.name %></td>
<td><%= repos.attributes.description %></td>
<td><%= repos.attributes.language %></td>
</tr>
<% }); %>
我不知道發生了什麼事!