有没有办法用它的父模板包围一个聚合物子模板?
在以下示例中,影子标签将父模板带入子视图,但它忽略了其内容:
母体聚合物元素
<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>