Just-in-time compilation (JIT) compiles an Angular application's templates while the application starts or runs. With ng serve, Angular bootstraps the application and compiles templates in the browser, making development faster despite poorer runtime performance. section 9.2.3
Production deployment instead uses ng build to create a precompiled application through ahead-of-time compilation (AOT), allowing the browser to execute generated rendering commands directly. Both approaches compile templates into JavaScript commands, supporting rendering on the server and in the browser. section 9.2.3
The practical distinction is:
- Use JIT during development when faster development build times matter most. section 9.2.3
- Use AOT for production so templates are compiled before deployment and need not be compiled in the browser. section 9.2.3






