When looking AOT (ahead of time compilation) docs https://angular.io/docs/ts/latest/cookbook/aot-compiler.html#!#compile , there is a dependency on platform-server , what is the purpose of it ? seems only compiler-cli required to run the compiler tool
Asked
Active
Viewed 9,961 times
2 Answers
7
This question is related to Angular V2 but now Angular V4.0.0 Almost release (in the time of writing it is in RC-3) and @Angular/platform-server changed a lot
So Just for the reference
based on this link: https://github.com/angular/angular/issues/13822
some part of Angular Universal(API part) is merged to @angular/Core some another part is now rewritten with the name of @angular/platform-server
an as @mikezks mentioned on that topic https://github.com/angular/angular/issues/13822#issuecomment-286742244 all the magic is renderModuleFactory (that is the whole magic behind SSR).
so from now: @angular/platfomr-server is for server side rendering of Angular and generating HTML pages(in NodeJS)

Alireza
- 100,211
- 27
- 269
- 172

Mahmood Sajjadi
- 422
- 5
- 12