Get lower value with AngularJS

0

How to compare the three values with ng-if and get the smallest value. The idea is the least value to stick with the div in another color ...

<div class="card-header text-center" style="background: #f3bb70; color: #2d1b53" ng-if="somaClaro > somaTim">
                <span class="d-block font-weight-bold" style="font-size: 40px;">{{somaClaro * 24 | currency}}
                    <small style="font-size: 15px; font-weight: 600">(24 meses)</small>
                </span>
</div>

<div class="card-header text-center" style="background: #f3bb70; color: #2d1b53" ng-if="somaVivo > somaTim">
                <span class="d-block font-weight-bold" style="font-size: 40px;">{{somaVivo * 24 | currency}}
                    <small style="font-size: 15px; font-weight: 600">(24 meses)</small>
                </span>
</div>

<div class="card-header text-center" style="background: #f3bb70; color: #2d1b53" ng-if="somaTim > somaClaro">
                <span class="d-block font-weight-bold" style="font-size: 40px;">{{somaTim * 24 | currency}}
                    <small style="font-size: 15px; font-weight: 600">(24 meses)</small>
                </span>
            </div>
    
asked by anonymous 21.06.2018 / 02:25

0 answers