【发布时间】:2015-08-19 20:32:58
【问题描述】:
我正在尝试制作一个简单的“Hello World!”元素。我已经尝试使用 bower 安装聚合物组件,并且我使用了 zip 文件。我也使用了 python 和 npm HTTP 服务器,但我仍然没有得到任何输出。
<html>
<head>
<title>Polymer</title>
<script src="bower_components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="elements/hello-world.html">
</head>
<body unresolved>
<hello-world></hello-world>
</body>
</html>
与元素文件
<link rel="import" href="../bower_components/polymer/polymer-mini.html">
<polymer-element name="hello-world" noscript>
<template>
<h1>Hello World!</h1>
</template>
</polymer-element>
【问题讨论】:
-
<polymer-element>是聚合物 0.5。你想要<dom-module>。见polymer-project.org/1.0/docs/start/quick-tour.html。
标签: polymer bower polymer-1.0