Migrating Polymer project .5 to 1.0 error

半世苍凉 提交于 2020-01-16 05:53:05

问题


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:


回答1:


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.



来源:https://stackoverflow.com/questions/32168348/migrating-polymer-project-5-to-1-0-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!