简体   繁体   中英

Angular2 package.json Dependencies?

I'm new at Angular2 development. Looking at a few examples online, in the package.json file under the "dependencies", some examples have:

"@angular/common": "2.0.0-rc.1",
"@angular/core": "2.0.0-rc.1",

While some examples have:

"angular2": "2.0.0-beta.15",

From what I have read, the @angular/.. is newer and used with the Release Candidates of Angular2.

Now some npm packages rely on "@angular/.." and some on "angular2". My question is can you have both in the package.json or will it cause issues? Also going forward with any new development I should ignore "angular2" and use "@angular/.." instead?

Thanks for the help!

When "RC" was released they changed the package name from angular2 to @angular.

My question is can you have both in the package.json or will it cause issues?

If you mean to use the 'angular2' notation for newer version, the answer is NO. Otherwise it wouldn't make sense, as it would only work for versions prior to RC.

Also going forward with any new development I should ignore "angular2" and use "@angular/.." instead?

Yes, this is the standard and will probably be kept for the final release.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM