簡體   English   中英

的x flipox不工作定制聚合物元件上

[英]x-flipox not working on custom polymer element

大家好,我正在嘗試創建一個自定義的Polymer元素,該元素使用其模板標記中的<x-flipbox>元素。

但是,似乎<x-flipbox>標記僅在索引頁面上起作用,而不在我的自定義元素內起作用。

這是我的自定義元素,我在做什么錯?

<link rel="import" href="../bower_components/polymer/polymer.html">

<link rel="import" href="../bower_components/x-tag-imports/x-tag-flipbox.html">

<polymer-element name="nautes-flipbox" attributes="">
  <template>
    <style>
      :host {
        display: block;
      }
    </style>


  <x-flipbox>
      <div>I'm the front face.</div>
      <div>I'm the back face.</div>
  </x-flipbox>

  </template>
  <script>
    Polymer({

    });
  </script>
</polymer-element>

上面的元素僅顯示了兩個div。

<x-flipbox>
      <div>I'm the front face.</div>
      <div>I'm the back face.</div>
</x-flipbox>

粘貼在index.html中的這一行僅顯示一個div(應如此)。

此外,如何調試此類問題? (我是Polymer的新手,控制台沒有給我任何錯誤/警告)

你不需要將它作為一個進口,這是一個老包裝的東西聚合物鄉親寫了包括X標記元素(它可能什么復雜化這一點)。 你可以簡單地包括JS(作為<script>和CSS(作為<link rel="stylesheet">的X-flipbox回購的內部src目錄,你有你的<link rel="import">為翻頁盒

回購: https://github.com/x-tag/flipbox/tree/master/src

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM