0

How can I include jQuery UI in an Angular2 application?

The dependencies are managed by WebPack. So I added jquery-ui with npm install --save jquery, then yarn.

When I try to use jQuery UI's feature, $(...).tabs("show") as described in jQuery UI example, what I get is

vendor.js:104458 TypeError: $(...).tabs is not a function

I looked at vendor.ts and wanted to try adding it there, but I didn't find a file which looked like the one to require().

What are all the necessary steps to get $(...).tabs() (and jQuery UI functions in general) working?

Note for duplicaters: jQuery is not jQuery UI. jQuery UI is a plugin which adds functions to jQuery. I know how to import jQuery.

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277

0 Answers0