1
<mat-slider thumbLabel min="0" max="100" step="1" value="0" >

<button type="button" (click)="Refresh()">Click Me!</button>

Refresh(){
// What should be written in this

}

Suppose I changed this slider and when I click on refresh button, I need to adjust the value again to zero

Can any one explain how to do it..

ThankYou....!!!!

bollam_rohith
  • 334
  • 4
  • 17

1 Answers1

1

Simply add value as ngModel to change it as needed

Here is a stackblitz example

ts

value: number = 0

Refresh(){
  this.value = 0
}

html

<mat-slider thumbLabel min="0" max="100" step="1" [(ngModel)]="value" ></mat-slider>
<button type="button" (click)="Refresh()">Click Me!</button>
Alexis
  • 1,685
  • 1
  • 12
  • 30