Open emersonthis opened 9 years ago
I'm experiencing this as well.
Commenting/removing line 29 from nouislider.js seems to resolve the issue:
Works as a fix, yes. But I guess it is not optimal if you're using the property - or as I am, working on a project with multiple people where vendor files are not added to the codebase.
I figured out what's going on here. When the margin setting is absent or zero a false value is passed to testMargin()
in jquery.nouislider.js line 489:
function testMargin ( parsed, entry ) {
if ( !isNumeric(entry) ){
throw new Error("noUiSlider: 'margin' option must be numeric.");
}
parsed.margin = parsed.spectrum.getMargin(entry);
if ( !parsed.margin ) {
throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.");
}
}
If you pass a margin value via the attribute then the error doesn't happen. So my earlier hack is unnecessary if you do want a margin. If you don't, you can comment out that line until there's a patch.
bower install angular-nouislider --save
The bower installation couldn't find suitable version for angular, and maybe nouislider too (can't remember). So I left the versions I was already using (listed above)
Commenting/removing line 29 from nouislider.js seems to resolve the issue:
It seems that this option is causing errors in recent versions of nouislider, because when I leave it in I get the following error: