0

How to set items per line in a column?

Here is HTML code:

<td ng-repeat="dr in img">
     <input id="imBed" ng-model="q" type="image" ng-src="{{dr.IMG}}" style="width: 50px;height: 50px" ng-click="Save(dr)" />
      <span ng-model="dr.BEDNO" style="width:60px">{{dr.BEDNO}} </span>
</td>
Xplora
  • 837
  • 3
  • 12
  • 24

1 Answers1

0

Here's how i did mine if you use bootstrap you can use col-md-2 so in one row/line you can have 6 images.

<div class="row">
<div class="col-md-2" ng-repeat="dr in img">
    <img class="card-img-top" ng-src="{{ dr.IMG }}">
    <span ng-model="dr.BEDNO" style="width:60px">{{dr.BEDNO}} </span>
</div></div>

Note ng-repeat must be inside <div class="row"></div

if you want a more programmatically approach refer to this post.

code.cycling
  • 1,246
  • 2
  • 15
  • 33