How to uncheck mat-slide-toggle when I checked another mat-slide-toggle using Material Angular

1k Views Asked by At

I have this DEMO project

Can you ask me any idea how to uncheck mat-slide-toggle Title when I checked another mat-slide-toggle Published date and the opposite?

1

There are 1 best solutions below

0
On BEST ANSWER

good morning :D. You forgot to put in your code the [(ngModel)]="yourVariable" to receive the value when they change!

I recommend that you read more about forms and reactive forms:

Forms Reactive Forms

Here is you demo fixed: Demo