0
的关系我有关系的模型:观察在Ember.js
Whistlr.Organization = DS.Model.extend
upload: DS.belongsTo('upload')
在控制器方面,我想观察更改了这种关系:
Whistlr.OrganizationController = Ember.ObjectController.extend
image: (->
alert "The upload has changed!"
).property('upload')
但这并不当我设置上传时触发:
@set('upload', upload)
我们是否可以观察关系,就像我们观察其他道具一样ERTIES?如果不是,有没有办法做到这一点?
谢谢,杰里米。原来,这段代码的作品(即使'财产'而不是'观察')。真正的问题是在代码中更深层次的,你帮助我在这里[这里](http://stackoverflow.com/questions/19149404/setting-a-belongsto-relationship-on-a-dirty-object-in-余烬-JS/19189137?noredirect = 1#19189137)。再次感谢两个方面! – nullnullnull