seiyria/angular-bootstrap-slider

angular throws exception when trying to use the slider

Closed this issue · 3 comments

I'm trying to use the slider with angular v1.2.16 but I get the following error on the page where I try to include the slider:

Error: $compile:multidir
Multiple Directive Resource Contention
Multiple directives [sliderslider, new/isolated scope

] asking for {4} on: {5}

The error links to this page:
https://docs.angularjs.org/error/$compile/multidir?p0=slider&p1=slider&p2=new%2Fisolated%20scope&p3=%3Cdiv%20slider%3D%22%22%20ng-model%3D%22sliders.secondSliderValue%22%20min%3D%22minTest%22%3E

Any idea what could be the reason for this? Do you have any working plucker where I could see the slider working?

Best,
Gregor

Going to need an example, but looking at this, it looks like you put the slider directive on the same element twice.

my bad - I had an additional directive that was also called slider which was causing the collision. The error is a bit confusing since I was checking if I have
<slider ... > multiple times in the text, but instead I had two directives named slider.

I had the same issue. Turned out it was two other sliders directives that used a library called slider.js. Once I removed those the angular-bootstrap-slider started working.