Search code examples
polymergulpbowerweb-componentpolymer-starter-kit

How do you view a Polymer element's demo page in Polymer Start Kit?


After doing:

cd polymer-starter-kit-1.0.3
npm install -g gulp bower && npm install && bower install
gulp serve

How do you browse to and view an element's demo page, such as:

http://localhost:3000/bower_components/paper-input/demo/

When viewing the source of the URL above, it shows the paths to be relative to the demo directory, in the form of:

<link rel="stylesheet" href="styles/main.css">
<script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script>
<link rel="import" href="elements/elements.html">

What do you need to do to make the paths resolve properly?


Solution

  • Include index.html at the end of the URL.

    http://localhost:3000/bower_components/paper-input/demo/index.html