I want to get the values from my checkboxes but I can only get true or false.
Here is my template:
<h4>Categories</h4>
<div class="form-check" *ngFor="let cat of categories$|async">
<input class="form-check-input" [(ngModel)]="cat.id" name="" type="checkbox" id="">
<label class="form-check-label" for="">
</label>
</div>
Here is my component
this.categories$ = this.storeService.getAllCategories().pipe(
map(result => (result as any).data),
tap(r => console.log(r))
)
My component basically gets a list of the categories from an external api
Aucun commentaire:
Enregistrer un commentaire