intersect (propertyKey) Ember.ComputedProperty
public
A computed property which returns a new array with all the duplicated elements from two or more dependent arrays.
Example
let obj = Ember.Object.extend({ friendsInCommon: Ember.computed.intersect('adaFriends', 'charlesFriends') }).create({ adaFriends: ['Charles Babbage', 'John Hobhouse', 'William King', 'Mary Somerville'], charlesFriends: ['William King', 'Mary Somerville', 'Ada Lovelace', 'George Peacock'] }); obj.get('friendsInCommon'); // ['William King', 'Mary Somerville']
Parameters:
-
propertyKey
String
Returns:
-
Ember.ComputedProperty
- computes a new array with all the duplicated elements from the dependent arrays
Please login to continue.