polymerweb-componentpolymer-2.xpaper-elements

How do I get paper-textarea working in Polymer 2.x?


How do I get <paper-textarea> working in Polymer 2.x? It doesn't appear at all. What am I doing wrong? A working demo would be wonderful.

jsBin Demo

<!DOCTYPE html>
<html>

  <head>
    <base href="//polygit.org/components/">
    <link rel="import" href="polymer/polymer.html">
    <script src="webcomponentsjs/webcomponents-lite.js"></script>
    <link rel="import" href="paper-input/paper-textarea.html">
  </head>

  <body>
    <paper-textarea label="Hello world"></paper-textarea>
  </body>

</html>

Solution

  • <paper-textarea> still works in Polymer 2.x, and your code would work with local HTML imports. The reason the JSBin demo doesn't appear is due to the deprecation (and disabling) of Polygit, as shown on http://polygit.org:

    Polygit is deprecated and only compatible with Bower and Polymer 1.0 & Polymer 2.0. As an alternative, use this Glitch to load dependencies via Bower.

    You'll also notice network failures in the console from your JSBin demo.

    You can replace the Polygit URL in <base> with https://cdn.rawgit.com/download/polymer-cdn/2.6.0.2/lib/ to see it working:

    <!DOCTYPE html>
    <html>
    
      <head>
        <base href="//cdn.rawgit.com/download/polymer-cdn/2.6.0.2/lib/">
        <link rel="import" href="polymer/polymer.html">
        <script src="webcomponentsjs/webcomponents-lite.js"></script>
        <link rel="import" href="paper-input/paper-textarea.html">
      </head>
    
      <body>
        <paper-textarea label="Hello world"></paper-textarea>
      </body>
    
    </html>