【问题标题】:<content> tag not rendering depending on placement in template<content> 标签不根据模板中的位置呈现
【发布时间】:2013-10-09 06:14:42
【问题描述】:

我不确定发生了什么,但 标记中的内容并未根据元素所在的位置呈现。

我正在使用的元素:

<my-element>
    <p>Hello There!</p>
</my-element>

在我的聚合物元素中:

<polymer-element name="my-element">

    <template>
        <!-- works here -->
        <div>
            <!-- works here -->
            <div>
                <!-- not work here -->
                <content></content>
                <div>
                    <!-- not work here -->
                    <div>
                        <!-- not work here -->
                    </div>
                </div>
            </div>
        </div>

    </template>

它似乎没有理由不工作。我已经花了几个小时了。不确定它可能是什么。谁能指出我正确的方向。任何帮助将不胜感激。

【问题讨论】:

    标签: javascript polymer web-component shadow-dom


    【解决方案1】:

    这看起来像https://github.com/Polymer/polymer/issues/283。已修复,但尚未发布稳定版本。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2010-09-20
      • 1970-01-01
      • 1970-01-01
      • 2020-07-13
      • 1970-01-01
      • 2016-08-27
      • 2019-04-01
      • 1970-01-01
      相关资源
      最近更新 更多