NG-Repeat isnt Displaying Data


#1
$scope.field = [
            1, 0, 0,            2, 0, 0,            1, 2, 1,
            0, 1, 0,            2, 0, 0,            2, 1, 2,
            0, 0, 1,            2, 0, 0,            1, 2, 1
        ];
<ion-view view-title="Game">
    <ion-title>
    </ion-title>
    <ion-content>
        <center>
            {{field}}
            </br>_____</br>
            <div ng-repeat="o in field | limitTo:9">
                {{o}}
            </div>
        </center>
    </ion-content>
</ion-view>

The Result:

[1, 0, 0, 2, 0, 0, 1, 2, 1,0, 1, 0, 2, 0, 0, 2, 1, 2, 0, 0, 1, 2, 0, 0, 1, 2, 1]
_____

What am i doing wrong? It doesnt work without limitto either


#2

Use

“o in field track by $index”

Instead of

“o in field | limitTo:9”


#3

hi thanks :slight_smile: how can i make it so that it just 's when 9 items are printed next to each other?