Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/algorithm/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Polymer 1.x:让定制元素在Plunker中向世界问好_Polymer_Polymer 1.0_Plunker_Iron Data Table_Polymer 1.x - Fatal编程技术网

Polymer 1.x:让定制元素在Plunker中向世界问好

Polymer 1.x:让定制元素在Plunker中向世界问好,polymer,polymer-1.0,plunker,iron-data-table,polymer-1.x,Polymer,Polymer 1.0,Plunker,Iron Data Table,Polymer 1.x,鉴于更复杂的内容,el似乎完全正确地导入了铁数据表。我是否忽略了一些简单的事情?请用一个有效的声音回答 http://plnkr.co/edit/p7IE7v6DHLVnEggeO8PF?p=preview <base href="https://polygit.org/polymer/components/"> <link rel="import" href="polymer/polymer.html"> <script src="webcomponentsjs/

鉴于更复杂的
内容,el
似乎完全正确地导入了
铁数据表。我是否忽略了一些简单的事情?请用一个有效的声音回答

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>

你好,世界
(功能(){
"严格使用",;
聚合物({
是‘x-foo’,
});
})();

您会注意到浏览器控制台显示:

加载资源失败:服务器响应状态为400()

加载资源失败:服务器响应状态为400()

x-foo.html:14未捕获引用错误:未定义聚合物

浏览器找不到Polymer所需的导入,因为您的
URL在
x-foo.html
中的polygit配置格式不正确:

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

<component>[+<org>]+<ver>|:<branch>|*
[+]+||*
因此,您的
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/">

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