I have data response as object:
let response = {
attachments: [{id: 1}, {id: 2}, {id: 3}]
}
I use this data in root component <app-root></app-root>
<app-documents [response]="response"></app-documents>
<app-attachments [response]="response"></app-attachmnets>
Inside component app-documents
I try to update response:
response.attachments.push({id: 4});
But in app-attachments
component that uses the same response
object is not changed.
How to fix it?