how to put text on mat-slide-toggle like when it is true I want to show it as assigned and when false not assigned
<mat-slide-toggle (click)="openDialog1(element.courseId, true )" [checked]="checked">Assign All</mat-slide-toggle>
how to put text on mat-slide-toggle like when it is true I want to show it as assigned and when false not assigned
<mat-slide-toggle (click)="openDialog1(element.courseId, true )" [checked]="checked">Assign All</mat-slide-toggle>
Copyright © 2021 Jogjafile Inc.
Remove
[checked]="checked"
and use[(ngModel)]
instead, and show html content based on the flag, like this -Declare a flag in ts file -