我试图开始使用Polymer,但是当我将 webcomponents.js 放在我的 index.html 中时,我得到了一个空白页面。如果我添加导入,则在"Uncaught TypeError: undefined is not a function"
中收到错误Polymer.html:37
。
这是我的 index.html :
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1">
<title>Atom Shell App</title>
<script src="bower_components/webcomponentsjs/webcomponents.min.js"></script>
<link rel="import" href="bower_components/font-roboto/roboto.html">
<link rel="import" href="bower_components/core-icons/core-icons.html">
<link rel="import" href="bower_components/core-toolbar/core-toolbar.html">
<link rel="import" href="bower_components/core-media-query/core-media-query.html">
<link rel="import" href="bower_components/paper-icon-button/paper-icon-button.html">
<!-- build:css public/css/master.css -->
<link rel="stylesheet" href="public/css/main.css">
<!-- endbuild -->
</head>
<body unresolved>
<core-toolbar style="background: #4285f4;">
<paper-icon-button icon="menu"></paper-icon-button>
<span flex>Title</span>
<paper-icon-button icon="refresh"></paper-icon-button>
<paper-icon-button icon="more-vert"></paper-icon-button>
</core-toolbar>
<!-- build:js public/js/master.js -->
<script src="public/js/main.js"></script>
<!-- endbuild -->
</body>
</html>