suraj kiran
suraj kiran

Reputation: 49

how to import external javascript to polymer project

I am completely new to polymer 1.x. i like to know how to import javascript file to my index.html . normal way of importing javascript not working for production version

Upvotes: 0

Views: 1184

Answers (1)

Srik
Srik

Reputation: 2381

If you are new to polymer below are the good resources to start understanding it

  1. Developer guide: https://www.polymer-project.org/1.0/docs/devguide/feature-overview.html
  2. Polymer element source codes. All the polymer elements are in github with the source code and demo code. http://github.com/polymerelements, https://elements.polymer-project.org/browse
  3. Polymer starter kit: https://github.com/PolymerElements/polymer-starter-kit. You can use this as base to build your application.

The answer for your question is in routing.html in the polymer-starter-kit. You just include it in script tag as you do in any html file.

<script src="../bower_components/page/page.js"></script>

Upvotes: 1

Related Questions