angularjs – 键入安装特定版本的定义文件

前端之家收集整理的这篇文章主要介绍了angularjs – 键入安装特定版本的定义文件前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是TypeScript的新手.我想在我的应用程序中安装特定版本的角度定义文件.

使用TSD我可以使用以下命令

tsd install angular -v "1.4.0" -rso

由于TSD已被弃用,我已转向打字以自动化定义文件安装.

我的问题是,使用打字,我可以安装特定版本的角度定义文件吗?如果是这样,那么打字中的命令是什么?

更新:

我试过下面的命令,但它们没有用.

typings install angular@1.4.0

typings install angular@1.4.0 --ambient

错误消息如下所示:

$typings install angular@1.4.0 --ambient
typings ERR! message Unable to find "angular" for "dt" in the registry. Did you want to install ambient typings with the ambient flag? If you can contribute these typings,please help us: https://github.com/typings/registry
typings ERR! caused by https://api.typings.org/entries/dt/angular/versions/1.4.0/latest responded with 404,expected it to equal 200

typings ERR! cwd /Users/idolezalova/projects/wfm
typings ERR! system Darwin 15.4.0
typings ERR! command "/Users/idolezalova/.nvm/versions/node/v4.3.1/bin/node" "/Users/idolezalova/.nvm/versions/node/v4.3.1/bin/typings" "install" "angular@1.4.0" "--ambient"
typings ERR! node -v v4.3.1
typings ERR! typings -v 0.7.12

typings ERR! If you need help,you may report this error at:
typings ERR!   <https://github.com/typings/typings/issues>

解决方法

来自帮助:

$typings install -h

typings install (with no arguments,in package directory)
typings install <pkg>[@<version>] [ --source [dt | npm | github | bower | common | shared | lib | env | global] ]
typings install file:<path>
typings install github:<github username>/<github project>[/<path>][#<commit>]
typings install bitbucket:<bitbucket username>/<bitbucket project>[/<path>][#<commit>]
typings install <http:// url>

Aliases: i,in
Options: [--name] [--save|--save-dev] [--ambient] [--production]

这意味着这个命令应该工作(你还需要添加–ambient标志,因为它还没有从DefinitelyTyped移植):

typings install angular@1.4.0 --ambient

猜你在找的Angularjs相关文章