Mat Slider value not getting updated while sliding

Issue

Mat slider value is not sync updated while sliding.

<mat-slider [(ngModel)]="myValue" step="1" min="0" max="100" ></mat-slider>
{{myValue}} 

It just got updated only after release slider thumb.

Solution

Using the javascript input event:

<mat-slider [(ngModel)]="myValue" (input)="myValue = $event.value"></mat-slider>

Answered By – Ploppy

Answer Checked By – Gilberto Lyons (AngularFixing Admin)

Leave a Reply

Your email address will not be published.