equal (dependentKey, value) Ember.ComputedProperty
public
A computed property that returns true if the provided dependent property is equal to the given value.
Example
let Hamster = Ember.Object.extend({ napTime: Ember.computed.equal('state', 'sleepy') }); let hamster = Hamster.create(); hamster.get('napTime'); // false hamster.set('state', 'sleepy'); hamster.get('napTime'); // true hamster.set('state', 'hungry'); hamster.get('napTime'); // false
Parameters:
-
dependentKey
String
-
value
String|Number|Object
Returns:
-
Ember.ComputedProperty
- computed property which returns true if the original value for property is equal to the given value.
Please login to continue.