Basic overview of Just In Time (JIT) Vs Ahead Of Time (AOT) Compilation in Angular Applications
2 min readJul 12, 2017
The main differences between JIT and AOT in Angular are:
- The time when the compilation takes place.
- JIT generates JavaScript however, AoT usually generates TypeScript.
Flow of events with Just-in-Time Compilation
- Development of Angular application with TypeScript.
- Compilation of the application with
tsc
. - Bundling.
- Minification.
- Deployment.
Once we’ve deployed the app and the user opens her browser, she will go through the following steps (without strict CSP):
- Download all the JavaScript assets.
- Angular bootstraps.
- Angular goes through the JiT compilation process, i.e. generation of JavaScript for each component in our application.
- The application gets rendered.