Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/76.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Polymer无法在IE 11上使用模板重复生成HTML表_Html_Polymer - Fatal编程技术网

Polymer无法在IE 11上使用模板重复生成HTML表

Polymer无法在IE 11上使用模板重复生成HTML表,html,polymer,Html,Polymer,这种使用聚合物的HTML在Chrome、IE 11和Firefox中工作: <polymer-element name="greeting-tag"> <template> <template repeat="{{s in salutations}}"> {{s.what}},{{s.who}} </template> </template> <scri

这种使用聚合物的HTML在Chrome、IE 11和Firefox中工作:

<polymer-element name="greeting-tag">
  <template>
      <template repeat="{{s in salutations}}">
        {{s.what}},{{s.who}}
      </template>             
  </template>
  <script>
    Polymer('greeting-tag', {
      ready: function() {
        this.salutations = [
          {what: 'Hello', who: 'World'},
          {what: 'GoodBye', who: 'DOM APIs'},
          {what: 'Hello', who: 'Declarative'},
          {what: 'GoodBye', who: 'Imperative'}
        ];
      }
    });
  </script>
</polymer-element>

{{s.what},{{s.who}
聚合物('T-tag'{
就绪:函数(){
这是。问候=[
{什么:'你好',谁:'世界'},
{什么:'再见',谁:'DOM API'},
{什么:'你好',谁:'声明'},
{什么:'再见',谁:'命令'}
];
}
});
但当模板repeat替换为呈现HTML表的代码时:

<polymer-element name="greeting-tag">
  <template>
    <table>
      <template repeat="{{s in salutations}}">
        <tr>
            <td>{{s.what}}</td>
            <td>{{s.who}}</td>
        </tr>
      </template>             
    </table>
  </template>
  <script>
    Polymer('greeting-tag', {
      ready: function() {
        this.salutations = [
          {what: 'Hello', who: 'World'},
          {what: 'GoodBye', who: 'DOM APIs'},
          {what: 'Hello', who: 'Declarative'},
          {what: 'GoodBye', who: 'Imperative'}
        ];
      }
    });
  </script>
</polymer-element>

{{s.what}}
{{s.who}}
聚合物('T-tag'{
就绪:函数(){
这是。问候=[
{什么:'你好',谁:'世界'},
{什么:'再见',谁:'DOM API'},
{什么:'你好',谁:'声明'},
{什么:'再见',谁:'命令'}
];
}
});

它在Chrome和Firefox中工作,但在IE11中不工作(元素根本不渲染)。有什么线索吗?

好的,这个问题已经描述过了,它可以:

<polymer-element name="greeting-tag">
  <template>        
   <table>
     <tr template repeat="{{s in salutations}}">
       <td>{{s.what}}</td>
       <td>{{s.who}}</td>
     </tr>
   </table>     
  </template>
  <script>
    Polymer('greeting-tag', {
      ready: function() {
        this.salutations = [
          {what: 'Hello', who: 'World'},
          {what: 'GoodBye', who: 'DOM APIs'},
          {what: 'Hello', who: 'Declarative'},
          {what: 'GoodBye', who: 'Imperative'}
        ];
      }
    });
  </script>
</polymer-element>

{{s.what}}
{{s.who}}
聚合物('T-tag'{
就绪:函数(){
这是。问候=[
{什么:'你好',谁:'世界'},
{什么:'再见',谁:'DOM API'},
{什么:'你好',谁:'声明'},
{什么:'再见',谁:'命令'}
];
}
});