2

この Plunk で、x-foo要素が HELLO WORLD をレンダリングしないのはなぜですか? .

より複雑な場合、完全に正しくcontent-elインポートされているようです。iron-data-table私は単純なものを見落としていますか?ワーキングプランクで答えてください。

http://plnkr.co/edit/p7IE7v6DHLVnEggeO8PF?p=preview
<base href="https://polygit.org/polymer/components/">
<link rel="import" href="polymer/polymer.html">
<script src="webcomponentsjs/webcomponents-lite.min.js"></script>

<dom-module id="x-foo">
    <template>
        <style></style>
        HELLO WORLD
    </template>

  <script>
    (function() {
      'use strict';
      Polymer({
        is: 'x-foo',

            });
        })();
  </script>
</dom-module>
4

1 に答える 1

2

ブラウザ コンソールに次のように表示されます。

https://polygit.org/polymer/components/polymer/polymer.htmlリソースの読み込みに失敗しました: サーバーは 400 のステータスで応答しました ()

https://polygit.org/polymer/components/webcomponentsjs/webcomponents-lite.min.jsリソースの読み込みに失敗しました: サーバーは 400 のステータスで応答しました ()

x-foo.html:14 Uncaught ReferenceError: Polymer が定義されていません

<base>URL の polygit 構成の形式が正しくないため、ブラウザは Polymer に必要なインポートを見つけることができませんx-foo.html:

<base href="https://polygit.org/polymer/components/">

の予期されるURL形式polygit.org:

<server-name>/[<configurations>/]components/<component>/<path>

どこに<configurations>/ある:

<component>[+<org>]+<ver>|:<branch>|*

したがって、<base>URL は次のいずれかになります。

<base href="https://polygit.org/components/">
<base href="https://polygit.org/polymer+:master/components/">
<base href="https://polygit.org/polymer+v1.7.0/components/">

プランカー

于 2016-10-13T04:00:50.400 に答える