Search code examples
angularangular2-aotaotangular-aot

What is the meaning of pre-compiled in AOT (Angular)


I am going through the Angular documentation for AOT. I came across the word pre-compiled, but I'm unable to understand the meaning of it.

The line in the Angular documentation is:

With AOT, the browser downloads a pre-compiled version of the application.

Link to documentation is https://angular.io/guide/aot-compiler


Solution

  • Just-in-Time (JIT), which compiles your app in the browser at runtime. Ahead-of-Time (AOT), which compiles your app at build time.

    The word pre-compiled means it already complied i.e your Angular HTML and TypeScript code compiled into efficient JavaScript code during the build phase itself before delivered and being run in the browser.