javascript - Observer not working in Ember? -
i can't observer in ember.js. basically, have ember.select dropdown menu, , want bind more action event of selecting value in dropdown. example:
app.selectedpersoncontroller = ember.object.create({ person: null, persondidchange: function() { // here when person changes console.log("person changed") }.observes('person') });
and nil happening, though 'person' attribute getting updated. suggestions?
this due fact of version pre4 cannot set property or observable upon em.*.create()
function. have first utilize .extend()
function first , set properties , observables in that, create object.
as example, take @ jsfiddle working extend functionality. seek take away using create
, you'll see app no longer works.
javascript javascript-events ember.js
No comments:
Post a Comment