I recommend using a Computed.property
which monitors the models that are changing and combines them into the array you need in your template
.
When modelA
or modelB
changes your computed property will update with those results.
myList: Ember.computed('modelA', 'modelB', function() {
let combinedModels = [];
this.get('modelA').forEach( item => {
// pull out what you need from each model item
combinedModels.push(item);
});
this.get('modelB').forEach( item => {
// pull out what you need from each model item
combinedModels.push(item);
});
return combinedModels;
});