Skip to content

Instantly share code, notes, and snippets.

@nigilan
Last active June 19, 2018 11:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nigilan/6f92bbcfef4b6c89696c95fe8ca4bad7 to your computer and use it in GitHub Desktop.
Save nigilan/6f92bbcfef4b6c89696c95fe8ca4bad7 to your computer and use it in GitHub Desktop.
EmberObject
import Ember from 'ember';
import EmberObject from '@ember/object';
let India = EmberObject.create({
capital : 'New Delhi'
});
let China = EmberObject.create({
capital : 'Beijing'
});
let TamilNadu = EmberObject.create({
stateCapital : 'Chennai'
});
let capitals = [India, China, TamilNadu];
let capiral = capitals.mapBy('capital')
alert(capiral);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment