I need help to sort the buttons I am generating with angular. I'm using "ng-repeat" and it's generating the 8 buttons correctly however they're getting out of the order I need. Here is the code and the output image:
<style>
.divpai {
margin: 0 auto;
width: 50%;
border: 3px solid;
border-color: darkblue;
position: relative;
}
.tclass {
position: absolute;
bottom: 0;
}
.tclass td {
width: 513px;
padding: 5px;
}
.btf {
color: white;
font-weight: bold;
font-size: 20px;
}
</style>
<div class="page-header" id="principal" ng-controller="HomeCtrl">
<div class="divpai" style="width:950px; height: 734px; background-color:#F3E10A" align="center">
<table class="tclass">
<tr ng-repeat="menus in menu" style="text-align: right;">
<td style="text-align: left;" ng-if="4>=($index+1)"><button id="btf1" class="btf" style="width:416px; height: 79px; background-color:#2E5491">{{menus.nome}}</button></td>
<td style="text-align: right; " ng-if="($index+1)>=5"><button id="btf5" class="btf" style="width:416px; height: 79px; background-color:#2E5491">{{menus.nome}}</button></td>
</tr>
</table>
</div>
</div>
I want you to display the 1-4 buttons in the lower left corner, and the 5-8 buttons in the lower right corner. Anyone have any idea how I should fix it? Thanks for any help.