Created
November 10, 2017 19:36
-
-
Save joegaudet/f1cc4cb5e7b3935d7348d115771fd8a1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Foo = Ember.Object.extend({ | |
// this is being placed on the Foo prototype | |
// and will be shared between all instances of foo | |
someData: [] | |
}); | |
const aFoo = Foo.create({}); | |
const anotherFoo = Foo.create({}); | |
aFoo.get('someData').push(1); | |
anotherFoo.get('someData').push(2); | |
aFoo.get('someData'); // [1, 2] | |
anotherFoo.get('someData'); // [1, 2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment