Using Angular 1 libraries in Angular 2?

前提是你 提交于 2019-11-28 07:25:10

问题


Can I use Angular libraries, for example angular-cookies in Angular 2 app? Seems that this is not possible, but I want to know this cause I'm planning to upgrade project to Angular2


回答1:


In general, no. If you're interested in following the migration guide by running Angular 1 and 2 simultaneously, you may be able to get an Angular 1 library functioning, but it's likely not worth your trouble.

I'd encourage you not to be scared of rewriting common libraries for yourself. You'll be surprised by how easy it is - in many instances you'd spend more time trying to figure out a library's documentation, and you gain an intimate understanding of the code.



来源:https://stackoverflow.com/questions/35436914/using-angular-1-libraries-in-angular-2

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