简体   繁体   English

在ember.js中手动触发属性更改

[英]Manually trigger property change in ember.js

I have a component with a property 'viewBox' that stores a POJO, with an observer on this property. 我有一个带有属性'viewBox'的组件,它存储一个POJO,并在此属性上有一个观察者。 I want to be able to modify the properties of this viewBox without using set and then manually trigger a change on the viewBox. 我希望能够在不使用set的情况下修改此viewBox的属性,然后手动触发viewBox上的更改。 Is this possible in ember.js ? 这可能在ember.js中吗?

您可以使用Ember.Observable上的notifyPropertyChange方法让Ember知道通过手动分配更改了属性。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM