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
The @angular/platform-server provides the server platform that supports the runtime compiler and it only as a dependency of compiler-cli. In the future, we will be installing compiler-cli that don't need it as here.
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With