我已安装新版本的聚合物库,铁元素&纸元素。 但是我收到以下错误:
polymer-micro.html:63 Uncaught TypeError:prototype.registerCallback不是函数
此页面没有任何代码:
聚合体('shape-menu',...
另外,我注意到目录结构对于核心保持不变元素,它没有改变为iron / neon元素。
所以我的代码使用相同的行来导入htmls。例如:
< link rel =importhref =〜/ Scripts / Polymer / core-animated-pages / transitions / slide-from-right.html> $ c
另请查看附件截图:
解决方案目录结构可能相同,但目前的文件nside 不同 - 重构/分割为多个文件。由于0.5和1.0不兼容,请确保您更新了代码。这个改变是一个很大的改变,它不仅仅是更新你的库。
查看他们的迁移指南关于您将必须做出的更改。你可能需要改变很多。您使用的功能可能会被弃用,因此您将不得不使用较新的替代方法。 Polymer作者创建了一个名为 polyup 的工具来帮助迁移,因此请检查一下。
I am trying to migrate my project from polymer .5 to polymer 1.0.
I have installed new version of polymer library, iron element & paper element. But I am getting following error:
polymer-micro.html:63 Uncaught TypeError: prototype.registerCallback is not a function
This page does not have any code like:
Polymer('shape-menu',...
Also, I have noticed that directory structure remains same for core elements. It did not changed to iron/ neon elements.
So my code uses the same line to import htmls. Eg:
<link rel="import" href="~/Scripts/Polymer/core-animated-pages/transitions/slide-from-right.html">
Also Please check screen shot attached:
解决方案The directory structure maybe same but files present inside are different - refactored/split into multiple files. Since 0.5 and 1.0 are not compatible make sure you update your code too. The change is a big one and it is not simple as just updating your library.
Check their migration guide on changes you would have to make. You may have to change quite a bit. Features that you use could be deprecated, so you will have to use newer alternative. The Polymer authors have created a tool called polyup to assist in migration, so check that out.
更多推荐
迁移Polymer项目.5到1.0错误
发布评论