So I want to show a bootstrap modal if a property trigger is false as shown in the code below. Basically, if a benefit selected in above control has a property for hasFunds as false, then show modal once that benefit is selected (will show that code at bottom), but if true, nothing happens with modal.
Code for modal:
<!-- hasFunds Modal -->
<div class="modal fade" id="hasFundsModal" tabindex="-1" role="dialog" aria-labelledby="hasFundsModalLabel" aria-hidden="true" ng-show="benefit.hasFunds == false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
<p>You have already claimed the full amount of your benefit, and so there may be no remaining funds to reimburse this claim. Are you sure you want to continue?</p>
</div>
<div class="modal-footer">
<input type="button" class="naviaBtn naviaBlue" data-dismiss="modal" value="yes">
<input type="button" class="naviaBtn naviaBlue" data-dismiss="modal" value="no">
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal-dialog -->
</div><!-- /.modal -->
The control above which has a dropdown selector that contains the property that triggers the true or false:
<div class="form-group col-md-6 naviaInp">
<label for="beneSelect">Select your benefit</label>
<select class="form-control" name="beneSelect" id="beneSelect" ng-model="benefit" ng-options="item.descr for item in claim" ng-required="true">
<option value="">Please select a benefit....</option>
</select>
<input type="hidden" ng-model="claimInfo.benefitId" ng-change="{{ claimInfo.benefitId = benefit.id }}"/>
</div>
<div ng-show="claimForm.beneSelect.$dirty && claimForm.beneSelect.$error.required" class="errorContainer">
<p class="claimError"><i class="fa fa-exclamation-circle"></i><span>this is a required field</span></p>
</div>
Currently, no modal shows whether true or false. Can't a modal be triggered from an ng-show?
Thanks much.