Below specified is my data
Id , Name , IsBillable
1 One 1
2 two 0
3. three 0
this will be the dropdown value below i'll share the html dropdown code
<mat-option *ngFor="let option of masterAppointmentTypes" [value]="option.id">
{{option.value}}
</mat-option>
the above html works. All i need to do is: get the IsBillable data at the below code
if(this.appointmentForm.get('id').value == this.appointmentForm.get('id').value && this.appointmentForm.get('IsBillable').value){
this.openPaymentDialog(appointmentData, queryParams)
}
else{
this.createAppointment(appointmentData, queryParams);
}
at the above code i get the ID value according to the selected dropdown but i didn't get IsBillable data according to the selected id.Below code is my formBuilder.
const configControls = {
'AppointmentTypeID': [appointmentObj.appointmentTypeID, Validators.required],
'IsBillable' : [appointmentObj.isBillable,Validators.required],
}
this.appointmentForm = this.formBuilder.group(configControls);