title: How to clear an angularJS array
body: <pre><code> $scope.itemarray = ['A', 'B', 'C'];  
  </code></pre>
  
  <p>this will clear the array but the ui wont be updated.</p>
  
  <pre><code>$scope.itemarray = [];
  </code></pre>
  
  <p>this works fine! why?</p>
  
  <pre><code> $scope.itemarray.length = 0;  
  </code></pre>