Angularjs循环二维数组

<div ng-app>
    <div ng-controller="test">
        <div ng-repeat="links in slides">
            <hr/>
            <div ng-repeat="link in links track by $index">
                {{link}}
            </div>
        </div>
    </div>
</div>

JS

function test($scope) {
    $scope.slides = [
        [ 1, 1, 1 ],
        [ 4, 5, 6 ],
    ];
}

 

posted @ 2015-07-01 11:08  leejersey  阅读(1418)  评论(0编辑  收藏  举报