tb / ng2-nouislider

Angular2 noUiSlider directive
http://tb.github.io/ng2-nouislider/
MIT License
184 stars 114 forks source link

Add missing input "animate" #132

Open gluix opened 6 years ago

gluix commented 6 years ago

Add missing input "animate" and set it inside "inputsConfig".

kiqq commented 6 years ago

We can set animate in config and it works well, so I am not sure if this is necessary.

<nouislider class="animated" [config]="sliderConfig6" [(ngModel)]="model6"></nouislider>
<nouislider [config]="sliderConfig7" [(ngModel)]="model7"></nouislider>
<button (click)="onAnimateClick()">Animate</button>
  model6 = 20;
  public sliderConfig6: any = {
    animate: true,
    animationDuration: 1000,
    range: {
      min: 0,
      max: 100
    }
  }

  model7 = 20;
  public sliderConfig7: any = {
    animate: false,
    range: {
      min: 0,
      max: 100
    }
  }

  onAnimateClick() {
    this.model6 = 50;
    this.model7 = 50;
  }
.animated .noUi-state-tap .noUi-origin {
    -webkit-transition: 1s;
    transition: 1s;
}