angularjs - Track By in ng-repeat throwing "Token 'track' is an unexpected token" -


i've simple ng-repeat track by expression wont work. here's fiddle.

<div ng-repeat="n in [1,2,3,4,5,5,5,5] track $index">     {{n}} </div> 

resulting token 'track' unexpected token @ column 19 of expression [[1,2,3,4,5,5,5,5] track $index] starting @ [track $index].

it's because you're using angular version 1.0.3 in fiddle.

change version (minimum of) 1.2 , work, since introduced in version.

i'll provide fiddle in comment since there's no code.


Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -