tb / ng2-nouislider

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

Multiple sliders on a page not working #123

Closed almcaffee closed 7 years ago

almcaffee commented 7 years ago

Im attempting to use multple sliders but the first slider one the page works fine and any others do not display.

Example:

<nouislider [connect]="true" [min]="0" [max]="rangeFilters['listprice'].max" [(ngModel)]="rangeFilters['listprice'].range"></nouislider>

<nouislider [connect]="true" [min]="0" [max]="rangeFilters['landsqft'].max" [(ngModel)]="rangeFilters['landsqft'].range"></nouislider>
almcaffee commented 7 years ago

Solved the issue, cant use [(ngModel)] inside a formGroup you need to use [formControl] instead or it causes that issue. Maybe that will help someone else.