1

how to come out of this error?

 jQuery(this.el.nativeElement.children[0]).slider('option', optionName, this.value); 

Error:

file: 'file:/slider_component/slider.component.ts'
severity: 'Error'
message: 'Property 'slider' does not exist on type 'JQuery'.'
at: '85,55'
source: 'ts'
user2280016
  • 1,799
  • 3
  • 13
  • 17

3 Answers3

1

Try adding this at the top of the component

declare let jQuery: any;
Rolland Saf
  • 91
  • 1
  • 3
0

you should use the jQueryUI, you can get it at http://jqueryui.com/download/

jQuery itself doesn't have the slider property

Paul Roefs
  • 368
  • 2
  • 3
  • 13
0

Adding jqueryui types to your project may resolve this issue. It did for me, I was using $(".abc").tabs(), and would receive a similar error. Adding the types via npm command below resolved. Note that you execute this command in your project root using cmd/terminal

npm i -D @types/jqueryui
hd1coder
  • 21
  • 3