How to make correspondence between clicked ngfor element and the actual binded object?

Hi,

I am having a array of Object. For example:

object={
color:"red",
value:"myvalue",
checked:false
}

myArray:Array<object>=[object, object1, object2,...etc]
<div   (click)="objTouched(index)"> {{myobj.color}}<div>
</div>

And on click, I d like to know what item was click in order to modify it from the controller. I may add a ngclass, if “obj.checked” is true or false.

Any help?

Thanks,

Stéphane.

Hum I was to impatient,

That was the good way.

{{myobj.color}}