Swap
Swap

Reputation: 237

Adding External JS libraries to Polymer

I want to add videoJS player to polymer app ? How to Adding External JS libraries to Polymer ? Thanks

Upvotes: 0

Views: 971

Answers (1)

Pascal L.
Pascal L.

Reputation: 1259

You need to wrap your JS dependencies in an import file.

  1. Create a new html file call it myVerySpecialLib-import.html.
  2. Add a script tag to that file which points to your library
  3. In the Component in which you want to use your lib import that myVerySpecialLib-import.html file

That's it! Now, you can use your library in your component.

Upvotes: 2

Related Questions