Reputation: 1
I have created a checkbox (ngmodel)]="ishighlylevaragedmeasure"
which has to display the value "true" and "false" when onclick checked and unchecked. but not changing the Boolean value to "true" when checked programatically . How to set the Boolean values to change inside ts.file for programatically checked and unchecked .
I have created here change event (Change)="getishighlylevaragedmeasure($event)"
I have created if else statement that it .
Upvotes: 0
Views: 626
Reputation: 34
Instead of [(ngModel)]="ishighlylevaragedmeasure", use [checked]="ishighlylevaragedmeasure".
Example: <input type="checkbox" [checked]="ishighlylevaragedmeasure" (change)="ishighlylevaragedmeasure = ! ishighlylevaragedmeasure" />
Upvotes: 0