Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

Hi i am using bellow code to create a polymer dropdown element.It is working fine in all browsers except IE.

fruits-list.html

<link href="https://rawgit.com/polymer/polymer/0.8-preview/polymer.html" rel="import">

<dom-module id="fruits-list">
  <template>
        <select>
          <template is="dom-repeat" items="{{employees}}">
          <option value="{{item.value}}">{{item.text}}</option>
          </template>
        </select>
  </template>
  <script>

    Polymer({
      is: 'fruits-list',
      ready: function() {
        this.employees = [
            {value: 'one', text: 'apple'},
            {value: 'two', text: 'banana'},
            {value: 'three', text: 'orange'}
        ];
      }
    });
  </script>
</dom-module>

index.html

 <html>
  <head>
   <script src="https://rawgit.com/webcomponents/webcomponentsjs/master/webcomponents-lite.js"></script>
    <link rel="import" href="x-example.html" />
  </head>
  <body>
    <fruits-list></fruits-list> 
  </body>
</html>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
190 views
Welcome To Ask or Share your Answers For Others

1 Answer

dom-repeat is not supported for all elements (e.g. select and table are not) in IE (thought it is supported in recent versions of Edge).

See also:


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...