How would I use AngularJS ng-repeat to display the following HTML (Twitter Bootstrap Scaffolding)? Essentially, every third record I need to close the <
Moving on from the more easy answer. I dislike the original solution because of the empty dom elements it produces. This is for 3 divs per row.
{{field}}
In function FieldsCtrl($scope):
$scope.fields.range = function() {
var range = [];
for( var i = 0; i < $scope.fields.length; i = i + 3 )
range.push(i);
return range;
}
If you know fields.length you can in place of fields.range() use [0,3,6,9] etc