Flex components property change event

I have a custom component on which I have bound an array collection to one of its proeprties:

<comp:MyComp id="comp" prop="{images}" />

images is an arraycollection

In the components' code I would like to know which event to listen on everytime images updates props.I tried a setter on props but the setter only gets called once when props is first set. I tried the collection event but I get "Update" events sent on top of 'add' and 'remove' events and I would rather not have to manage those. So is there an event(flex or otherwise) that is fired every time a component property is updated by a bindable property?

Answers


I think you want to listen to the collectionChange event on the prop property. This should fire every time an element in your ArrayCollection changes.

Be warned that changing the source of images not fire the collectionChange event, nor will it fire the prop setter.


Need Your Help

$anchorScroll only after ng-view load, not before

javascript angularjs

I want to autoscroll on top of a page after i load new content in my ng-view div.