Disable Button when input fields are empty in AngularJS

Last Reply 29 days ago By SUJAYS

Posted one month ago

how to remove css class in AngularJS in Angular 1?

Button:
<button class="btn btn-success right" ng-disabled ="!sender || !tracking  || !barcodes || !Item">Next&nbsp;<i class="fa fa-forward"></i></button>
 
<select name="myForm" id="carrier" ng-model="Carrier" ng-options="Carrier as Carrier.Carrier1 for Carrier in CopyEntities1" class="form-control" ng-init="GetAllCarrier()">
    <option value="">Select a type</option>
</select>
 
<select name="myForm" id="carrier" ng-model="Carrier" ng-options="track as track .track1 for Carrier in CopyEntities1" class="form-control" ng-init="GetAllCarrier()">
    <option value="">Select a type</option>
</select>

As the submit button should be disable when all textboxes are empty?

As I have tried ng-disabled. But this disables only one textbox alone.

You are viewing reply posted by: SUJAYS 29 days ago.
Posted 29 days ago

Active this a class using angular js.

<a class="nav-link disabled" ng-class="disabled" id="1menu" data-toggle="tab" href="menu1">Road Info</a>