tb / ng2-nouislider

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

TypeError: Cannot read property 'from' of undefined at NouisliderComponent.toValues #225

Closed stijnbollen closed 3 years ago

stijnbollen commented 3 years ago

I'm using ng2-nouislider@1.8.2 and nouislider@14.6.2 to create a very simple slider

    <nouislider [attr.disabled]="disabled"
                [config]="config"
                [max]="maxValue"
                [min]="minValue"
                [step]="step"
                [(ngModel)]="selectedValue"
                (ngModelChange)="handleChange()"
                (update)="handleUpdate()"
                (start)="handleStart($event)">
    </nouislider>

with config

       config = {
            direction: this.directionStr, // 'rtl' or 'ltr'
            orientation: this.orientationStr // 'vertical' or 'horizontal'
        };

and when I change the value, I get: ERROR TypeError: Cannot read property 'from' of undefined at NouisliderComponent.toValues

It should be using DefaultFormatter.

stijnbollen commented 3 years ago

the problem was gone after reinstalling.