I am including the component Slide toggle of Angular Material into my view and I want to disable the drag option and just allow the click function.

This toggle is not within a form, it is just in my DOM in order to change a value with the NgModel functionality in my component. I've already tried with the disableDragValue API native funtion of material, but it doesn´t disable the drag option.

<mat-slide-toggle [checked]="true" (click)="segmentationEvent()">Segmentation</mat-slide-toggle>

Expected: Disable the possibility of drag the slider toggle Result: I can´t disable the drag option on it

0 Answers