Ember._immediateObserver()

_immediateObserver (propertyNames, func) deprecatedprivate

Defined in packages/ember-metal/lib/mixin.js:755

Use Ember.observer instead.

Specify a method that observes property changes.

Ember.Object.extend({
  valueObserver: Ember.immediateObserver('value', function() {
    // Executes whenever the "value" property changes
  })
});

In the future, Ember.observer may become asynchronous. In this event, Ember.immediateObserver will maintain the synchronous behavior.

Also available as Function.prototype.observesImmediately if prototype extensions are enabled.

Parameters:

propertyNames String
func Function

Returns:

func
doc_EmberJs
2016-11-30 16:51:50
Comments
Leave a Comment

Please login to continue.