MichaelSun
MichaelSun

Reputation: 152

mat-slide-toggle is not disabling in Angular 15 but works fine in Angular 14 with same code

I updated to Angular 15 and now [disabled] attribute of mat-slide-toggle is not working well. The top toggle should be disabled at startup, but now it only becomes disabled after being manually turned off and then turned back on.

I created 2 examples in stackblitz with the same code:

Here it works well: https://stackblitz.com/edit/angular-ivy-zpxbxf?file=src%2Fapp%2Fapp.component.ts

and here is not: https://stackblitz.com/edit/angular-15-starter-pack-cpnrr2?file=src%2Fapp%2Fapp.component.ts

I solved this problem with workarounds, but I would still like to know what the problem is and why it doesn't work as expected

Upvotes: 2

Views: 538

Answers (0)

Related Questions