|
Answer» Advantages :
- Faster download: SINCE the app is already COMPILED, many of the ANGULAR compiler related libraries are not required to be bundled, the app bundle size get reduced. So, the app can be downloaded faster.
- Lesser No. of Http Requests: If the app is not bundled to support lazy loading (or whatever reasons), for each associated html and css, there is a separate request goes to the server. The pre-compiled application in-lines all templates and styles with components, so the number of Http requests to the server would be lesser.
- Faster Rendering: If the app is not AOT compiled, the compilation process happens in the browser once the application is fully loaded. This has a wait time for all necessary component to be downloaded, and then the time taken by the compiler to compile the app. With AOT compilation, this is optimized.
- Detect error at build time: Since compilation happens beforehand, many compile time error can be detected, providing a better degree of stability of application.
Disadvantages
- Works only with HTML and CSS, other file TYPES need a previous build step.
- No watch mode yet, must be done manually (bin/ngc-watch.js) and compiles all the FILES.
- Need to maintain AOT version of bootstrap file (might not be required while using tools like cli).
- Needs cleanup step before compiling.
Advantages : Disadvantages
|