Looking to create a grid of equal height and width divs using AngularJS to form a 7x5 square:
----------------------
| | | | | | | |
----------------------
| | | | | | | |
----------------------
| | | | | | | |
----------------------
| | | | | | | |
----------------------
| | | | | | | |
----------------------
While flex
and md-wrap
could easily achieve this with automatic line breaks, it becomes tricky with 7 divs in a row. The issue lies in the calculation:
container = 100%
container/7 = 14.28
but values can only be 10 or 15!
To tackle this with Angular, the following structure is needed:
<div ng-repeat="item in Ctrl.items">
{{item}}
</div>