mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-16 23:30:23 +00:00
docs(guide/expression): fix duplicate key error in example
The example that demonstrates how to parse expressions can fail if you pass in the same expression twice. By using "track by $index" we can fix this. Closes #4472
This commit is contained in:
parent
3e79c9b098
commit
e7177d3159
1 changed files with 1 additions and 1 deletions
|
|
@ -70,7 +70,7 @@ You can try evaluating different expressions here:
|
|||
<input type='text' ng-model="expr" size="80"/>
|
||||
<button ng-click="addExp(expr)">Evaluate</button>
|
||||
<ul>
|
||||
<li ng-repeat="expr in exprs">
|
||||
<li ng-repeat="expr in exprs track by $index">
|
||||
[ <a href="" ng-click="removeExp($index)">X</a> ]
|
||||
<tt>{{expr}}</tt> => <span ng-bind="$parent.$eval(expr)"></span>
|
||||
</li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue