ng-required not working when submitting a form
问题 I have the following code in an input text box with the required attribute, but when I tab off of the field or submit the form, it doesn't stop the form from submitting and informing the user the field is required. <div class="col-sm-8"> <input type="text" ng-required="true" class="form-control" placeholder="Enter Total Amount" id="txtTotalAmount" ng-model="formCtrl.AddCheckDeposit.TotalAmount" /> </div> What do I need to do to make the required directive to work? 回答1: For that you should