Get started creating custom elements with Polymer
Latest commit 12653ea Sep 19, 2016 @arthurevans arthurevans committed on GitHub Merge pull request #16 from scaratec/patch-1
Changed polyserve to polymer serve
Failed to load latest commit information.
demo Reorganized. Nov 10, 2015
icon-toggle-finished Update example code. Sep 13, 2015 Changed polyserve to polymer serve Sep 18, 2016
bower.json Reorganized. Nov 10, 2015
icon-toggle.html Reorganized. Nov 10, 2015

Your first Polymer element

This repo goes with the Build your first Polymer element codelab.

The codelab is designed to be used with Chrome Dev Editor. See the next section if you'd like to use another editor for the codelab.

Running the codelab without Chrome Dev Editor

If you're not using CDE, you'll need to install some command-line tools to manage dependencies and to run the demo.

  1. Download and install Node from Node includes the node package manager command, npm.

  2. Install bower and polyserve:

    npm install -g bower polymer-cli
  3. Clone this repo:
  4. Change directory to your local repo and install dependencies with bower:

    cd polymer-first-elements
    bower install
  5. To preview your element, run polymer serve from the repo directory:

    polymer serve

    Open localhost:8080/components/icon-toggle/demo/ in your browser. (Note that the path uses icon-toggle—the component name listed in this element's bower.json file—rather than the actual directory name.)

If you're wondering what polymer serve does, see Testing elements with local bower dependencies in the Polymer docs.