javascript - Iterate through an enumerable while preserving Ember.js bindings. -
how can iterate through array/enumerable in ember, while preserving get
, set
functionality?
fiddle i'm trying do:
i have action iterates through 'widgets' , marks them disabled. how can iterate through array of widgets while allowing widget.set('disabled', true)
.
the alternative of doing model.set('widgets.' + index + '.disabled', true)
seems hacky.
you're receiving error because objects in array not instances of ember.object
.
here updated jsfiddle: http://jsfiddle.net/lv4sf/8/
Comments
Post a Comment