Skip to content

Instantly share code, notes, and snippets.

Avatar

Michaël Gallego bakura10

  • Sapporo, Japan
View GitHub Profile
@sebastianseilund
sebastianseilund / merged_array.js
Last active Dec 20, 2015
An implementation of a merged array in Ember.js that combines items from multiple source arrays so you can easily list them together in your Handlebars templates. Read the blog post at the [Billy's Billing Developer Blog](http://dev.billysbilling.com/blog/How-to-merge-multiple-data-sources-into-one-array-in-Ember-js)
View merged_array.js
/**
* `Ember.MergedArray` is an array that observes multiple other arrays (called source arrays) for changes and includes
* all items from all source arrays in an efficient way.
*
* Usage:
*
* ```javascript
* var obj = Ember.Object.create({
* people: [
* {
You can’t perform that action at this time.