If I use some like this
application / route
model: @store.peekAll('account')
application / controller
modelDidChanged: Ember.observer('model', 'model.[].loaded', function() {
log('model changed')
})
application / template
<somecomponent accounts=model>
somecomponent / component
accountsDidChanged: Ember.observer('accounts', 'accounts.[].loaded', function() {
log('accounts changed')
})
somecomponent / template
each accounts as |acc|
if acc.loaded
<div>yes</div>
else
<div>no</div>
and then I update some property in account like this
@store.peekRecord('account', 1234).set('loaded', true)
component template will be correctly updated, but component and application observer will not be triggered
Aucun commentaire:
Enregistrer un commentaire