我想弄清楚如何在Angular CLI环境中使用各种第三方库。官方wiki page对于通过moment.js lib进行开发非常有用。虽然该错误信息显示为“在Angular CLI中使用第三方库类型
angular-cli: 1.0.0-beta.5
node: 4.4.4
os: darwin x64
typings: 1.0.5
:
typings install moment --save
typings WARN hastypings Typings for "moment" already exist in
"node_modules/moment/moment.d.ts". You should let TypeScript resolve
the packaged typings and uninstall the copy installed by Typings
typings ERR! message Unable to find "moment" ("npm") in the registry.
Did you want to try searching another source? Also, if you want contribute
these typings, please help us: https://github.com/typings/registry
我的设置以供参考:但是,我尝试安装分型的库(在本教程的步骤1A)时遇到了麻烦卸载由Typings安装的副本“似乎没有新的.d.ts
文件添加到项目文件夹中。在这种情况下,包含第三方类型的最佳方式是什么?
你有没有解决您的问题,一个开源库?你正在使用哪个版本的angular2? –