Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Ember from 'ember';
- export default Ember.Controller.extend({
- init() {
- this.set('foo', {
- bar: 'abc'
- });
- this.set('baz', Ember.Object.create({
- quux: 'def'
- }));
- },
- actions: {
- fooBarChange(value) {
- if (/^[a-z]*$/.test(value)) {
- this.set('foo.bar', value);
- }
- // This doesn't work
- this.notifyPropertyChange('foo.bar');
- },
- barQuuxChange(value) {
- if (/^[a-z]*$/.test(value)) {
- this.set('baz.quux', value);
- }
- this.get('baz').notifyPropertyChange('quux');
- }
- }
- });
Add Comment
Please, Sign In to add comment