Использование parentView
, чтобы получить доступ к свойствам parentView
«s должно работать:
Пример:
App.MyView = Ember.ContainerView.extend({
someProp: true,
didInsertElement: function() {
var viewClass = App.SomeView.create();
this.pushObject(viewClass);
}
});
Тогда вы могли бы использовать Ember.computed.alias('...)
для создания привязки:
App.SomeView = Ember.View.extend({
anotherProp: Ember.computed.alias('parentView.someProp'),
didInsertElement: function() {
console.log('anotherProp: '+this.get('anotherProp'));
}
});
извините за отсутствие коффицификации кода :)
example.
Надеюсь, это поможет.