mardi 22 janvier 2019

Unable to get the checkbox selected or not in template driven form (angular 7)

  <input type="checkbox" [name]="filter.filterName" ngModel />

let filterValue: string = testForm.form.value[filter.filterName];

filterValue is always returning empty string checkbox when checked and unchecked

how can i know that checkbox is checked or not in template driven form and no data binding. I need value from testForm:NgForm object ?




Aucun commentaire:

Enregistrer un commentaire