元素渲染HELLO?。
考虑到更复杂的情况,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>发布于 2016-10-13 04:00:50
您会注意到浏览器控制台显示:
https://polygit.org/polymer/components/polymer/polymer.html未能加载资源:服务器响应状态为400 () https://polygit.org/polymer/components/webcomponentsjs/webcomponents-lite.min.js未能加载资源:服务器响应状态为400 () ReferenceError:聚合物未定义
浏览器无法找到聚合物所需的导入,因为您的<base> URL在x-foo.html中有格式错误的polygit配置。
<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/">https://stackoverflow.com/questions/40011560
复制相似问题