我在一个视图中基本上有两个对象数组:
App.List = Ember.View.extend({
students: [{ "name": "yehuda" }, { "name": "tom" }],
teacher: [{ "name": "mr. katz" }, { "name": "mr. dale" }]
});
我的车把看起来像这样:
{{#each teacher}}
<li class="teacher">{{name}}</li>
{{#each students}}
// display students for this teacher
{{/each}}
}}
这里明显的问题是,students
-array 不在teacher
-array 之内,而是在同一个“级别”上。那么如何访问students
-array?
谢谢!