title: Update an Angular variable in the view
body: <p>I would like my output to read</p>
  
  <pre><code>0
  01
  012
  0123
  01234
  etc...
  </code></pre>
  
  <p>I expected this simple code I wrote to do the trick, but instead it prints</p>
  
  <pre><code>01111111111 011111111111
  02222222222 022222222222
  03333333333 033333333333
  04444444444 044444444444
  05555555555 055555555555
  06666666666 066666666666
  </code></pre>
  
  <p>Why is this happening?</p>
  
  <p>This is my Angular code:</p>
  
  <pre><code>&lt;div ng-app="App" ng-controller="ctrl"&gt;
       &lt;div ng-repeat="num in [1, 2, 3, 4, 5, 6]"&gt;
           &lt;label&gt;{{previousNumber}}&lt;/label&gt;
           {{previousNumber = (previousNumber + "" + num)}}
       &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>And here's the JSFiddle:
  <a href="http://jsfiddle.net/fd1f6yso/2/" rel="nofollow">http://jsfiddle.net/fd1f6yso/2/</a></p>