title: Angular 4 refresh view after change in array
body: <p>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 :</p>
  
  <pre><code>data =JSON.parse(JSON.stringify(data))
  </code></pre>
  
  <p>to get a new reference for the data array. Is this correct? Is there any better way to do that ?  </p>