I was referring this documentation and came across the compilation concept. One can use either JIT or AOT compilation. However, I found it very brief and need to know follow
JiT (Just in Time) Compilation
The name itself describes the working, It compiles the code just in the time of loading the page in browser. The browser will download the compiler and build the application code and renders it.
It will be good for development environment.
AoT (Ahead of Time) Compilation
It compiles all the code at the time of building the application. So the browser doesn't want to download the compiler and compile the code. In this method browser can easily render the application by just loading the already compiled code.
Can be used in the production environment
We can compare the JiT and AoT compilation as below
There is actually only one Angular compiler. The difference between AOT and JIT is a matter of timing and tooling. With AOT, the compiler runs once at build time using one set of libraries; with JIT it runs every time for every user at runtime using a different set of libraries.