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/">