What is the Angular compiler, and how does it work?
- The Angular compiler converts Angular templates and TypeScript code into efficient
JavaScript code.
- There are two modes:
- JIT (Just-in-Time): Compilation happens in the browser at runtime.
- AOT (Ahead-of-Time): Compilation happens during the build phase,
producing optimized JS files.
- It processes:
- Templates → render functions
- Metadata → static code to improve runtime
- Ivy compiler is the latest Angular compiler.