Search code examples
polymerpaper-elements

Getting Started with Polymer's Paper Elements


I've been playing with Polymer. I've successfully built a "hello world" app. My app includes the iron-elements. I'm now trying to integrate the paper-elements. Unfortunately, I can't seem to get them to work in my project.

I installed them via bower install PolymerElements/paper-elements. I then imported the .html similar to the way I did for the iron elements. However, the items didn't appear. So, I decided to take a step back and just do a "hello world" with the paper elements. To my surprise, I couldn't figure out how to just display a Button with Paper. Surely I'm not this dumb.

I sought out a basic app I could pull from GitHub and use. However, I didn't have any luck doing that either. Currently, I have the following:

<html>
  <head>
    <title>Hello</title>
    <script src="res/packages/webcomponentsjs/webcomponents-lite.min.js"></script>   

    <!-- Polymer -->
    <link rel="import" href="res/packages/polymer/polymer.html"> 

    <!-- Paper Elements -->
    <link rel="import" href="res/packages/font-roboto/roboto.html">   
    <link rel="import" href="res/packages/paper-header-panel/paper-header-panel.html">
    <link rel="import" href="res/packages/paper-toolbar/paper-toolbar.html">
    <link rel="import" href="res/packages/paper-button/paper-button.html">     

    <!-- End of Paper Elements -->

    <!-- End of Polymer -->

  </head>
  <body unresolved>
    <h1>Hello</h1>
    <paper-header-panel>
      <paper-button raisedButton label="button"></paper-button> 
    </paper-header-panel>        
  </body>
</html>

what am I doing wrong? Can someone either tell me what I'm missing or point me to a basic "hello world" app with Paper?

Thank you!


Solution

  • Remove your paper-header-panel and try this:

    <paper-button raised>Raised button</paper-button>