ngx-slider
ngx-slider copied to clipboard
Export SliderComponent in public API so we can benefit from TypeScript when using @ViewChild
At the moment I cannot programatically set the slider to disabled, and updating the Options
the slider is constructed with won't make it react, so I have to do something like this:
@Component({
selector: 'mycomp',
template: `<button (click)="disableSlider()">Disable Slider</button><ngx-slider #mySlider ...></ngx-slider>`
...
})
export class MyCompComponent {
@ViewChild('mySlider') sliderComponent!: any; // <-- I would like to use SliderComponent from this tool package.
disableSlider() {
this.sliderComponent?.setDisabledState(true);
}
}
I have to use any
because the SliderComponent
class isn't exported in the public api file.
Is there any reason why the class isn't exported?
I'm happy to contribute and do it.