JSFiddle - React, Tailwind, and code Playground
HTML
<div ng-app>
<div ng-controller="showCrtl">
<div ng-repeat="option in primaryCoverageOptions">
<label>
<input type="checkbox" ng-model="coverageCosts[$index]" ng-true-value="{{option}}" ng-false-value="0"/>
Add this coverage {{option | currency}}/YR
</label>
</div>
<select ng-model="coverageCosts[2]">
<option disabled selected>Select one...</option>
<option ng-repeat="option in specialCoverageOptions" ng-value="option">
{{option | currency}}
</option>
</select>
<h1 class="annualCost">TOTAL ANNUAL COST<br>OF HOME WARRANTY</h1>
<span style="color: green; font-size: 45px; line-height: 2;">
{{totalCost() | currency}}
</span>
<div>
Selected coverage costs: {{coverageCosts}}
</div>
<br>
</div>
</div>
JavaScript
function showCrtl($scope) {
$scope.coverageCosts = [];
$scope.totalCost = function (){
return $scope.coverageCosts.reduce(function(sum, cost){
return sum + parseInt(cost);
},0);
};
$scope.primaryCoverageOptions = [150,40];
$scope.specialCoverageOptions = [200, 500];
}