collect (dependentKey) Ember.ComputedProperty
public
A computed property that returns the array of values for the provided dependent properties.
Example
let Hamster = Ember.Object.extend({ clothes: Ember.computed.collect('hat', 'shirt') }); let hamster = Hamster.create(); hamster.get('clothes'); // [null, null] hamster.set('hat', 'Camp Hat'); hamster.set('shirt', 'Camp Shirt'); hamster.get('clothes'); // ['Camp Hat', 'Camp Shirt']
Parameters:
-
dependentKey
String
Returns:
-
Ember.ComputedProperty
- computed property which maps values of all passed in properties to an array.
Please login to continue.