Skip to content

Instantly share code, notes, and snippets.

@chrism
Created November 10, 2015 13:39
Show Gist options
  • Save chrism/4f9fda0542146226362f to your computer and use it in GitHub Desktop.
Save chrism/4f9fda0542146226362f to your computer and use it in GitHub Desktop.
// models/parent.js
import DS from 'ember-data';
export default DS.Model.extend({
name: DS.attr('string'),
children: DS.hasMany('child')
});
// now we need to use this approach
model.get('children').then((children) => {
// now we can work with the children
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment