我想將一個控制器的計算屬性的值設置爲另一個控制器。從另一個控制器設置計算屬性
var BusinessOwner = Ember.ObjectController.extend({
actions: {
save: function(){
var self = this;
return Ember.$.ajax({
}).then(function(){
var ownerShow = self.store.getById('application',100);
ownerShow.get('ownerGeneral');
ownerShow.set('ownerGeneral', 'complete')
Ember.set(self, 'controllers.collectinfo.ownerGeneral','completed');
//self.set('controllers.collectinfo.ownerGeneral', "completed");
});
}
}
我已經嘗試了幾次不同的嘗試來設置這個屬性,但已經證明不成功。如果我使用自設置,我必須使用Ember.set()的錯誤。如果我使用Ember.set()我得到錯誤collectinfo必須是全局的,如果沒有給出obj。
感謝所有幫助
編輯: 感謝您看這個。是的,我包含需求:'collectinfo'我仍然收到Ember.set()需要用來設置對象的錯誤
謝謝,我仍然得到相同的error.Ember.set()需要用來設置對象 – Bungdaddy