Angular 4 refresh view after change in array

Viewed 13018

I have a question without any code. I read somewhere that the view only updates when some of the variables change their reference. But how does it work with arrays? When I edit an array, sometimes the view updates, sometimes not. Is there any way to refresh the view after an array change? Right now I use :

data =JSON.parse(JSON.stringify(data))

to get a new reference for the data array. Is this correct? Is there any better way to do that ?

1 Answers
Related