How to use Polymer's Iron-Selector in plain JS?

56 Views Asked by At

I am using this CDN repo: https://github.com/download/polymer-cdn to import Polymer's Iron-Selector into my HTML page, other elements import sucessfully but Iron-Selector component does not. No error message is shown at the console either. Here's my code:

<html>
  <head>

    <title>iron-selector</title>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <base href="https://cdn.rawgit.com/download/polymer-cdn/1.5.0/lib/">
    <script src="webcomponentsjs/webcomponents-lite.min.js"></script>
    <link rel="import" href="iron-icon/iron-icon.html">
    <link rel="import" href="iron-icons/iron-icons.html">
    <link rel="import" href="iron-selector/iron-selector.html">
    <link rel="import" href="paper-button/paper-button.html">
  <body >
    
     <iron-selector selected="0">
      <div>Item 1</div>
      <div>Item 2</div>
      <div>Item 3</div>
    </iron-selector>
     
    <div>
      <paper-button raised><iron-icon icon="check"></iron-icon>OK</paper-button>
      <paper-button raised><iron-icon icon="clear"></iron-icon>Cancel</paper-button>
    </div>
    
     </body>
</html>

All components are displayed except iron-selector component, any clues why?

0

There are 0 best solutions below