I'm using an array of objects which I'm passing from my parent component to child components.
When a new item is pushed to the array or the property of one of the existing objects in the array changes it does not trigger the ngOnChanges
for the components that are using this variable (parent/child/sibling components).
In AngularJS we had $watchCollection
using which we could keep watch on the complex objects. Do we have something similar for Angular2+?
How to do deep checking similar to $watchCollection
in Angular2 +?
I'm familiar with AngularJS but not Angular2 +.
UPDATE:
Following @Shirish Patel's suggestion here, I found that although the change in the variable gets reflected everywhere but the ngOnChanges
function does not get triggered. Why is it so? I need to get this function triggered so that I can handle other operations on change of the value.