我有两个元素,在不同的html文件中,我如何在核心组件核心中显示这些元素的简历?当我在一个html文件中加入两个文件时,看起来很好,但是在不同的文件中没有。仅显示“master”元素(element-one)。
组件1:
<!--
##### Example:
<element-one name="ruben"></element-one>
@element element-one
@blurb Firts element.
@status alpha
-->
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="element-two.html">
<polymer-element name="element-one" attributes="name">
<template> ... </template>
<script>
Polymer( 'element-one', { ... });
</script>
</polymer-element>
组件2:
<!--
##### Example:
<element-two subname="cid"></element-two>
@element element-two
@blurb Second element.
@status alpha
-->
<polymer-element name="element-two" attributes="subname">
<template> ... </template>
<script>
Polymer( 'element-two', { ... });
</script>
</polymer-element>
答案 0 :(得分:2)
component-page上的https://github.com/Polymer/core-component-page链接并未指向任何有意义的内容,因此查看生成文档的内容的文档非常具有讽刺意义。 (我已就此提出bug。)
但如果您查看source,则会在<core-component-page>
上看到两个属性。 sources
获取与您要记录的每个元素相对应的.html
个文件数组。
<google-map>
的{{3}}来源就是index.html的来源。