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

how to do line continuation in perl debugger for entering raw multi-line text (EOT)? -

javascript - Create websocket without connecting -

android - Linear layout children not scrolling -