I'm trying to push values into the array from the other component with no relation(Parent or child), but after coming back to my current component where array values are already updated but no change on DOM. ngOnInit isn't called because the component is already launched. I wanted to update the DOM as well without any event from the other component. Here is the add-family component where I want the change
<ng-container *ngFor="let i of currentFilesRV">
<ion-icon *ngIf="i === control.key" (click)="alreadySubmitted()" class="icon-dyamic" name="checkmark-circle" style="color: green;"></ion-icon>
</ng-container>
now check the array which is updated by the other component which is add-sample component
this.addFamilyComponent.currentFamilyFiles(this.relationValue);
also the change in array in add-family component(which is working)
currentFamilyFiles(relationVal){
this.zone.run(() => {
this.currentFilesRV.push(relationVal)
console.log("RV: ", this.currentFilesRV)
})
}
i've used this ngZone from here Router Navigate does not call ngOnInit when same page