-
Notifications
You must be signed in to change notification settings - Fork 123
no such method 'setValue' for slider widget instance #57
Comments
No idea; can you make a plunker that simulates your environment better? |
Difficult... it's a big app with so many libraries :-( |
Sorry, without knowing specifically what's going wrong, it's hard to debug an issue. |
I understand that ... I will still "fight" to understand my trouble... until I can make a plunker |
I got it. This does not work when include jquery-ui. That's annoying. Here is my plunker. http://plnkr.co/edit/hO421vl7G1nHAfCtvclK?p=preview When you remove the jquery-ui script, all is fine... except that I don't understand why my initial value is not set Thanks for Help |
There is an issue about this on the bootstrap-slider project : seiyria/bootstrap-slider#250 An answer was find here for the bootstrap-slider : http://stackoverflow.com/questions/26691018/using-bootstrap-slider-with-jquery-ui It says : use bootstrapSlider() function in order ti initialize the bootstrap-slider, in replacement of slider() Maybe this directive can consider this... |
If you'd like to submit a PR that adds a new attribute |
What about using the same test than the original bootstrap-slider component, instead of a new if($) {
var namespace = $.fn.slider ? 'bootstrapSlider' : 'slider';
$.bridget(namespace, Slider);
} |
That'd be fine also. |
Well, I can't achieve in making this works. Adding jQuery-UI, we must use Replacing then the 6 occurences of
In the destroy method in destroy: function(){
// Remove event handlers on slider elements
this._removeSliderEventHandlers();
// Remove the slider from the DOM
this.sliderElem.parentNode.removeChild(this.sliderElem);
/* Show original <input> element */
this.element.style.display = "";
// Clear out custom event bindings
this._cleanUpEventCallbacksMap();
// Remove data values
this.element.removeAttribute("data");
// Remove JQuery handlers/data
if($) {
this._unbindJQueryEventHandlers();
this.$element.removeData('slider');
}
}, if someone has any idea... |
Are you using the right version of the library with the directive? |
Think so. Clone the project, run |
Just checking. I don't know, it should not matter which function you use. That said, I can't claim to understand how bridget works; it COULD be a byproduct of this library using the jQuery wrapper instead of using the vanilla JS style. Perhaps, the PR would remove the jQuery aspect and instead use that vanilla JS constructor? |
The same error occurs in the following (slider.js - line 178): // deregister ngModel watcher to prevent memory leaks |
@namwkim : Are you using jQuery-UI ? |
Yea I am using jQuery-UI. As far as I know it worked with jQuery-ui before. I am wondering if this problem occurs with recent updates?. Here is a working version if you want: |
It's possible that jquery UIs slider is interfering with it, as it has in the past. |
@namwkim The versions you've linked to fix the issue. Where are they from? |
Hi,
I'm trying to use this durective in my application, but no way.
I always have an "no such method 'setValue' for slider widget instance" Error, and my DOM is not like the one in your test page :
Has someone an idea on my trouble ?
The text was updated successfully, but these errors were encountered: