我刚刚安装了Laravel with Polymer。
我有:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="components/polymer/polymer.html">
<link rel="import" href="components/core-icon/core-icon.html">
</head>
<body>
<core-icon src="//www.polymer-project.org/images/icons/android.svg"></core-icon>
</body>
</html>
引发:
Uncaught TypeError:prototype.registerCallback不是函数 - polymer-micro.html:63
关于此错误的在线文章很少,我尝试过:
bower update
bower cache clean
无效。
我该如何解决这个问题?
我的bower.json:
"dependencies": {
"polymer": "Polymer/polymer#~1.0.5",
"paper-elements": "PolymerElements/paper-elements#~1.0.1",
"iron-elements": "PolymerElements/iron-elements#~1.0.1"
}
答案 0 :(得分:0)
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
<script src="components/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="components/polymer/polymer.html">
<link rel="import" href="components/core-icon/core-icon.html">
</head>
<body>
<core-icon src="//www.polymer-project.org/images/icons/android.svg"></core-icon>
</body>
</html>
添加
<link rel="import" href="bower_components/polymer/polymer.html">