【发布时间】:2014-01-28 02:25:40
【问题描述】:
有没有办法用其父模板包围聚合物子模板?
在以下示例中,影子标签将父模板带入子视图,但它忽略了其内容:
母聚合物元素
<polymer-element name="my-window">
<template>
<div class="windowframe">
<p>test</p> <!-- can be shown with shadow tag -->
<content></content> <!-- cannot be used with shadow tag -->
子聚合物元素
<polymer-element name="my-window-example" extends="my-window">
<template>
<!-- get the hosts' shadow and insert here -->
<shadow>
<p>Here is the content of my window<p> <!--won't be shown -->
</shadow>
</template>
【问题讨论】:
-
您能否详细说明您要完成的工作?
标签: dart dart-polymer polymer web-component shadow-dom