Polymer 聚合物hello世界组件未渲染
我正在学习聚合物教程 我使用的是Polymer 1.0(本教程是较旧的版本)。我已将Polymer 聚合物hello世界组件未渲染,polymer,web-component,Polymer,Web Component,我正在学习聚合物教程 我使用的是Polymer 1.0(本教程是较旧的版本)。我已将platform.js更改为webcomponents.js 现在我的index.html如下 <!doctype html> <html> <head> <title>Polymer Trial</title> <script src="bower_components/webcomponentsjs/webcomponent
platform.js
更改为webcomponents.js
现在我的index.html
如下
<!doctype html>
<html>
<head>
<title>Polymer Trial</title>
<script src="bower_components/webcomponentsjs/webcomponents.js"></script>
<link rel="import" href="elements/hello-world.html">
</head>
<body>
<h2>Test</h2>
<hello-world></hello-world>
</body>
</html>
但我在浏览器中得到的信息如下:;没有呈现“Hello World!”。
我错过什么了吗?我怎样才能知道问题出在哪里
下面是我的目录结构。
旧教程不适用于Polymer 1.0,因为有许多重大变化。在新版本中,Hello World看起来像:
<dom-module id="hello-world">
<template>
<h1>Hello world!</h1>
</template>
</dom-module>
<script>
Polymer({
is: 'hello-world'
});
</script>
你好,世界!
聚合物({
是:“你好,世界”
});
更多信息可在Polymer文档中找到,该文档位于较旧的教程不适用于Polymer 1.0,因为有许多重大更改。在新版本中,Hello World看起来像:
<dom-module id="hello-world">
<template>
<h1>Hello world!</h1>
</template>
</dom-module>
<script>
Polymer({
is: 'hello-world'
});
</script>
你好,世界!
聚合物({
是:“你好,世界”
});
更多信息可在Polymer文档中找到,该文档位于较旧的教程不适用于Polymer 1.0,因为有许多重大更改。在新版本中,Hello World看起来像:
<dom-module id="hello-world">
<template>
<h1>Hello world!</h1>
</template>
</dom-module>
<script>
Polymer({
is: 'hello-world'
});
</script>
你好,世界!
聚合物({
是:“你好,世界”
});
更多信息可在Polymer文档中找到,该文档位于较旧的教程不适用于Polymer 1.0,因为有许多重大更改。在新版本中,Hello World看起来像:
<dom-module id="hello-world">
<template>
<h1>Hello world!</h1>
</template>
</dom-module>
<script>
Polymer({
is: 'hello-world'
});
</script>
你好,世界!
聚合物({
是:“你好,世界”
});
更多信息可在聚合物文档中找到,网址为