고분자로 다른 웹 구성 요소를 쉽게 확장 할 수 있습니다. <shadow>
을 사용하여 부모의 음영 돔이 (polymer docs)이어야하는 하위 템플릿의 위치를 표시 할 수 있습니다.고분자 : 부모 요소를 둘레로 감싸기
저는 요소를 확장하려고하지만, 특정 부분의 자식이 부모에 의해 래핑되는 방식으로 보입니다. 이러한 종류의 설정은 일부 템플릿 엔진에서 사용했습니다. 이것이 html에 포함될 수 있습니까?
부모 ::
<link rel="import" href="/bower_components/polymer/polymer.html">
<polymer-element name="tpl-parent" noscript>
<template>
<section>
<content></content><!-- put the child template here -->
</section>
</template>
</polymer-element>
아이 ::
<link rel="import" href="/bower_components/polymer/polymer.html">
<link rel="import" href="parent.html">
<polymer-element name="tpl-child" extends="tpl-parent" noscript>
<template>
<shadow>
<p>whatever I put here should be "wrapped" by the _section_ in parent</p>
</shadow>
</template>
</polymer-element>
좋아, 제안한 것과 같은 문제가 해결되었습니다. 나를 위해 위대한 작품! – Christof