I've been attempting to incorporate a p-checkbox in Angular8 with true and false values as strings instead of booleans. So I tested the following code:
<p-checkbox [(ngModel)]="mycheckbox" name="mycheckbox" inputId="mycheckbox"
[trueValue]="'CB_OUI'" [falseValue]="'CB_NON'"></p-checkbox>
However, I consistently encounter this error message:
Can't bind to 'trueValue' since it isn't a known property of 'p-checkbox'.
This confusion arises because the documentation does mention trueValue
and falseValue
properties...
If anyone has any insights or solutions, your help would be greatly appreciated. Thank you.