i'm using angularJs to develop an app and I have to create some buttons, here is how I create them :
<div class="btn-group-view col-md-12 col-sm-12" role="group" aria-label="Basic example">
<button class="btn btn-selection col-md-4 col-sm-4" ng-click="selectView('raw'); selectTab('raw');" ng-class="{'active':selectedTab === 'raw'}">Raw data</button>
<button class="btn btn-selection col-md-4 col-sm-4" ng-click="selectView('summary'); selectTab('summary');" ng-class="{'active':selectedTab === 'summary'}">Summary</button>
<button class="btn btn-selection col-md-4 col-sm-4" ng-repeat="(key, value) in views" ng-click="selectView(key); selectTab(key);" ng-class="{'active':selectedTab === key}">
{{ key }}
</button>
</div>
So my container is col-md-12 and buttons are col-md-4, they can be 3 on each line.
The thing I want to do is for example if there is 4 button, the last one take the full width of his row, if there is 5 buttons, the two last one take 50% and 50% of the width.
I don't find how to do this, I think it can be done with an if statement on the html template to check the number of buttons but I don't know how to do this in AngularJs.