InterviewSolution
Saved Bookmarks
| 1. |
What is AOT compilation? What are the advantages of AOT? |
|
Answer» Every Angular application consists of components and templates that the browser cannot understand. Therefore, all the Angular applications need to be compiled first before running inside the browser. Angular provides two types of compilation:
In JIT compilation, the application compiles inside the browser during runtime. Whereas in the AOT compilation, the application compiles during the build time. The advantages of using AOT compilation are:
By default, angular builds and serves the application using JIT compiler: ng buildng serve For using AOT compiler following changes should be made: ng build --aotng serve --aot |
|