mardi 13 décembre 2022

how to bind checkboxes with angular in reactive forms

Actually I made an dummy project on health care so in that i made a component having Test Services in that I made a Radio Button ,On the click of radio Specific data goes to dropdown which is Services , and on the click on specific service i need sub services in check boxes and thn on the click of submit i need that goes to json server

I tried i made every thing radio dependent dropdown n checkboxes too but , when i check with the debugger it fetch the target value in check box only true no value , so i need value in checkboxes

In this image i bind the data fro ts to html and applying the for loop [In this ts file i call the change event with tha event.target.value here in change service i get the value but when i see with debugger its empty string only

the test service with the subservice data the html file here i made custom checkboxes and binf them with subServiices

the ts file here i create the change event with the help of that i get my target id

the test service here i made the json data so that i can fetch that

the issue which i facing that i don't get the value of subservice in the request of post




Aucun commentaire:

Enregistrer un commentaire