{{.}}
是否可以从内部引用隐式迭代器的值Ember.View
?
例如
查看模板
{{#each simple_old_array_of_numbers}}
{{view App.Subview}}
{{/each}}
查看代码
App.Subview = Em.View.extend({
template_name: 'subview_template',
didInsertElement: function() {
//do some logic based on the implicit iterator
//have tried this.get('.'), but that didn't work
}
});