I am learning Angular5, new to this.
I have two input fields, one button. Handled validations for that two fields, will enable the button once two fields are entered. I have disable the button when the form is invalid. But it is not working.
<form class="customerRegisteration-form">
<div class="form-row">
<div class="form-group col-md-6">
<label for="firstName">First Name</label>
<input required ngModel name="firstName" id="firstName" class="form-control" placeholder="First Name" #firstName="ngModel"/>
<div class="alert alert-danger" *ngIf="firstName.touched && !firstName.valid">First Name is required</div>
</div>
<div class="form-group col-md-6">
<label for="lastName">Last Name</label>
<input …Run Code Online (Sandbox Code Playgroud)