I am working with an angular2 parent component that looks like this:
ParentComponent {
some_array : Array;
(...)
}
Its child component is structured as follows:
ChildComponent {
selector: "child"
@Input some_object : Object;
}
In my layout, starting from the Parent component:
<ng-container *ngFor="let object of some_array">
<child [some_object]="object></child>
</ng-container>
And for the Child layout:
<Text [text]="some_object.text"/>
The rendering of the view is flawless and everything works perfectly.
However, when I make changes to my object property within the some_array
in the parent component using a for loop with [i]ndex, the child component does not reflect these changes and I need a way to detect them.
What would be the best approach to achieve this?
Thank you for your assistance