如何使用 Git 的当前 Angular 2 版本(带有 npm)



我目前正在关注 Angular 2 开发,这意味着我正在使用诸如

"@angular/common": "2.0.0-rc.4",
"@angular/compiler": "2.0.0-rc.4",
…

package.json.鉴于 Git 中已经有一些有用的修复程序,我想从 Git 安装最新版本(或一些特定的提交)。实现这一目标的最简单方法是什么?

最好避免在本地构建 Angular,但如果有必要,这也是可以接受的。

你可以从你的systemJs配置中引用角度CDN。像这样:
@angular:"https://npmcdn.com/angular2"

然后从包中删除依赖项.json

这个 plunker 中有一个例子

//map tells the System loader where to look for things
var  map = {
  'app':                        'app',
  '@angular':                   'https://npmcdn.com/@angular', // sufficient if we didn't pin the version
};

版本是在变量中指定的,但也许有类似/latest 的内容

最新更新