Last active
June 1, 2016 16:15
-
-
Save hergaiety/9c933a0e8b3f94473e35ca6576d6c0ca to your computer and use it in GitHub Desktop.
Listening for All Sub Properties
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
obj: Ember.Object.create({thing: 'Foo'}), | |
objThing: Ember.computed('obj.[]', function() { | |
return this.get('obj.thing'); | |
}), | |
init: function() { | |
this._super(); | |
Ember.run.later(() => { | |
console.log('ran'); | |
this.set('obj.thing', 'Bar'); | |
}, 100); | |
} | |
}); |
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
{ | |
"version": "0.8.1", | |
"EmberENV": { | |
"FEATURES": {} | |
}, | |
"options": { | |
"use_pods": false, | |
"enable-testing": false | |
}, | |
"dependencies": { | |
"jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", | |
"ember": "2.5.1", | |
"ember-data": "2.5.2", | |
"ember-template-compiler": "2.5.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment