title: Why is my array only updating in view once?
body: <p>i am doing a project to help visualize sorting algorithms and I'm facing a problem.<br>
  To help visualize the sorting process of an algorithm, I must show every changings in the array during that said process.<br>
  The problem is that my array is updating in my view only once the sort is done and <b>not</b> during the process.<br>
  <b>There are only integers in my arrays.</b></p>
  <p>Here is my code to display the array :</p>
  <pre><code>&lt;span *ngFor=&quot;let v of tab&quot;&gt;
      {{v}}
  &lt;/span
  </code></pre>
  <p>And here is my controller :
  (the timeout is used to slow down the process)</p>
  <pre><code>public sort(tab) {
  let start = performance.now();
  console.log(start);
  let smallest;
  for (let i = 0; i &lt; tab.length; i++) {
    smallest = tab[i];
    for (let j = i + 1; j &lt; tab.length; j++) {
      setTimeout(() =&gt; { }, 100000);
      if (tab[j] &lt; smallest) {
        let tmp = tab[j];
        tab[j] = smallest;
        tab[i] = tmp;
        smallest = tmp;
  
        //This doesn't update the view
        this.tab = tab;
      }
  
    }
  }
  //This does
  this.tab = tab;
  let end = performance.now();
  console.log(end);
  this.time = end - start;
  </code></pre>
  <p>The algo is probably not the most efficient but that's not the case ^^.</p>