Why angular packages are separated and why we need them

I started creating a new angular 2 application. I looked through the articles and downloaded some free applications from github, all of them have the angular / comman package along with some other packages. I installed the angular package and added "angular": "^1.6.5"to the package.json file. I'm not sure if we can have a complete package, then why do we install the command package separately?

When I checked another application, they basically have the following

"@angular/common": "2.0.1",
"@angular/compiler": "2.0.1",
"@angular/core": "2.0.1",
"@angular/forms": "2.0.1",
"@angular/http": "2.0.1",
"@angular/platform-browser": "2.0.1",
"@angular/platform-browser-dynamic": "2.0.1",
"@angular/router": "3.0.1",

Are they all part of the angular core? I do not see the angular package here.

Is there an article or recommendations for angular 2 packages?

+4
source share
1 answer

Here is a brief description of each package:

  • @angular/core - , , , ..
  • @angular/compiler - Angular.

  • @angular/platform-browser - , DOM. , Angular , .
  • @angular/platform-browser-dynamic - . , AOT.

  • @angular/common -
  • @angular/forms -
  • @angular/http - http-
  • @angular/router -

, @angular, . ngFor . ?

, . , , @angular/core.

. .

+4

Source: https://habr.com/ru/post/1681937/


All Articles