lundi 21 mars 2022

Get boolean value as a checkbox

I have a database. I want to display a table with all the data and get boolean values as a checkbox.

<ngx-datatable-column name="Value">
        <ng-template ngx-datatable-cell-template let-value="value">
            <mat-checkbox [(ngModel)]="valueGroup.isAction"></mat-checkbox>
        </ng-template>
</ngx-datatable-column>

But I have an error

core.mjs:6485 ERROR TypeError: Cannot read properties of undefined (reading 'isAction')
    at PriceGroupsComponent_ng_template_15_Template (price-groups.component.html:20:27)
    at executeTemplate (core.mjs:9618:1)
    at refreshView (core.mjs:9484:1)
    at refreshEmbeddedViews (core.mjs:10609:1)
    at refreshView (core.mjs:9508:1)
    at refreshEmbeddedViews (core.mjs:10609:1)
    at refreshView (core.mjs:9508:1)
    at refreshComponent (core.mjs:10655:1)
    at refreshChildComponents (core.mjs:9280:1)
    at refreshView (core.mjs:9534:1)
defaultErrorLogger @ core.mjs:6485



Aucun commentaire:

Enregistrer un commentaire