Polymer无法在IE 11上使用模板重复生成HTML表
这种使用聚合物的HTML在Chrome、IE 11和Firefox中工作: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
<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'},
{什么:'你好',谁:'声明'},
{什么:'再见',谁:'命令'}
];
}
});