我刚刚使用 Polymer 安装了全新的 Laravel。
我有:
<!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 is not a function - 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"
}
最佳答案
<!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">
关于javascript - 高分子高分子微致错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31202668/