Answer the question
In order to leave comments, you need to log in
How to display data in multiple columns?
How to display data from JSON in Angular? There is a code:
<div class="col-md-12 tovaru" ng-repeat="phone in phones">
<tr>
<td>{{phone.name}}</td>
</tr>
</div>
Answer the question
In order to leave comments, you need to log in
There are, let's say, 100 different product names, you need to display them in 3 columns.
<div class="col-md-12 product-list" ng-repeat="phone in phones">
<div class="product">{{phone.name}}</div>
</div>
.product-list {
column-count: 3;
}
Can't you just put them in three columns?
<div ng-controller="demo">
<table>
<tr ng-repeat="phone in phones">
<td>{{phone.id}}</td>
<td>{{phone.cat}}</td>
<td>{{phone.name}}</td>
</tr>
</table>
</div>
var app = angular.module('app', [])
.controller('demo', function($scope){
$scope.phones = [{id: 1, cat: 'Nokia', name: 'N90'}];
});
angular.bootstrap(document, ['app']);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question