title: Why does assignment not always work in Angular expressions?
body: <p>I just found this interesting apparent inconsistency in what is allowed in Angular expressions:</p>
  
  <ol>
  <li>It is possible to perform assignment in an expression</li>
  <li>This breaks if the assignment involves a local variable from an ngRepeat</li>
  <li>This can be overcome by using a setter defined in the controller instead of assignment in the expression</li>
  </ol>
  
  <p><a href="http://plnkr.co/edit/Lt57nqfm3TH7XdFa5xML?p=preview">See Plunker</a></p>
  
  <p>The <a href="http://docs.angularjs.org/guide/expression">docs on expressions</a> seem only to explicitly disallow control flow in expressions, and I don't see any mention of the kind of behavior above.</p>
  
  <p>I suppose the takeaway from this is it's probably a better design pattern to use a setter anyway, but does anyone know of a more definitive reference on what's possible in expressions? </p>
  
  <p>Maybe it would be better if Angular unilaterally prohibited assignment in them. (A related inconsistency is that it seems to be possible to increment in an expression with i = i+1 but not with i+=1...)</p>