ember.js - Ember: how to fire observers when any Em.A inside an Em.Object change -
let's have like
property: em.object.create(foo: em.a([]), bar: em.a([])), onanyarraychange: function(){ //some code }.observes('what here??') thing don't want explicitly
.observes('property.foo.[]', 'property.bar.[]') i'd love like
.observes('property.each_key.[]') is there way it?
yes possible @each property. see: http://emberjs.com/api/classes/ember.array.html#property__each
what need convert property ember.object ember.arrayproxy this:
property: em.arrayproxy.create({ content: [ em.a([]), // used foo em.a([]) // used bar ] }); and can:
.observes('property.@each.[]')
Comments
Post a Comment