Reputation: 1850
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'
Upvotes: 1
Views: 4929
Reputation: 21
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
Upvotes: 0
Reputation: 91
Try adding this at the top of the component
declare let jQuery: any;
Upvotes: 1
Reputation: 468
you should use the jQueryUI, you can get it at http://jqueryui.com/download/
jQuery itself doesn't have the slider property
Upvotes: 0