3

I am trying to figure out why the angular 2 quickstart recommends a package.json file like the following:

{
  "name": "angular2-quickstart",
  "version": "1.0.0",
  "scripts": {
    "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ",
    "lite": "lite-server",
    "postinstall": "typings install",
    "tsc": "tsc",
    "tsc:w": "tsc -w",
    "typings": "typings"
  },
  "license": "ISC",
  "dependencies": {
    "@angular/common":  "2.0.0-rc.1",
    "@angular/compiler":  "2.0.0-rc.1",
    "@angular/core":  "2.0.0-rc.1",
    "@angular/http":  "2.0.0-rc.1",
    "@angular/platform-browser":  "2.0.0-rc.1",
    "@angular/platform-browser-dynamic":  "2.0.0-rc.1",
    "@angular/router":  "2.0.0-rc.1",
    "@angular/router-deprecated":  "2.0.0-rc.1",
    "@angular/upgrade":  "2.0.0-rc.1",
    "systemjs": "0.19.27",
    "es6-shim": "^0.35.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12",
    "angular2-in-memory-web-api": "0.0.7",
    "bootstrap": "^3.3.6"
  },
  "devDependencies": {
    "concurrently": "^2.0.0",
    "lite-server": "^2.2.0",
    "typescript": "^1.8.10",
    "typings":"^0.8.1"
  }
}

Why are all of those @ signs before angular.. These packages don't install and don't exist in VS2015 ..

Blake Rivell
  • 13,105
  • 31
  • 115
  • 231

1 Answers1

4

For RC (release candidate) versions of Angular2, the root namespace of packages / modules was renamed from angular2 to @angular.

If you use beta versions, use angular2 but if RC versions, use @angular.

Note that the doc on angular.io relies on the latest version, an RC one.

Thierry Templier
  • 198,364
  • 44
  • 396
  • 360
  • Thank you for the explanation.. It is very strange though that when saving the package.json file in npm_modules I don't see an Angular2 folder.. Are the files being installed somewhere else? I just see the Angular in memory webapi folder. Additionally when using @ I don't see anything come up in the intellisense.. – Blake Rivell May 19 '16 at 13:09
  • 2
    For those of you who wanted to also know the "why" behind the "@", Check out Scoped Packages at https://docs.npmjs.com/getting-started/scoped-packages and http://stackoverflow.com/questions/36667258/understanding-npm-package-prefix-angular-router?noredirect=1&lq=1 – redfox05 Nov 08 '16 at 01:21