I have some data and I can compile this data into a div using ng-repeat . I am trying to split them into 2 columns and cannot find a way to create them.
Here is my example: (jsFiddle)
HTML:
<div ng-controller="Ctrl"> <div class="left"> <div ng-repeat="item in data">{{item.value}}</div> </div> <div class="right"> <div ng-repeat="item in data">{{item.value}}</div> </div> </div>
JS:
var app = angular.module('app', []); function Ctrl($scope) { $scope.data = [ {value: "a"}, {value: "b"}, {value: "c"}, {value: "d"},// trying to divide from here {value: "e"},// and show the last part in other column {value: "f"}, {value: "g"}, {value: "h"} ]; }
source share