Observable#propertyWillChange()

propertyWillChange (keyName) Ember.Observableprivate

Defined in packages/ember-runtime/lib/mixins/observable.js:270

Notify the observer system that a property is about to change.

Sometimes you need to change a value directly or indirectly without actually calling get() or set() on it. In this case, you can use this method and propertyDidChange() instead. Calling these two methods together will notify all observers that the property has potentially changed value.

Note that you must always call propertyWillChange and propertyDidChange as a pair. If you do not, it may get the property change groups out of order and cause notifications to be delivered more often than you would like.

Parameters:

keyName String
The property key that is about to change.

Returns:

Ember.Observable
doc_EmberJs
2016-11-30 16:52:44
Comments
Leave a Comment

Please login to continue.