Angular AOT ⌛️ (Ahead-of-Time) Compilation

Angular AOT Compilation

Angular AOT Compilation

Before the browser can render the application, it must be converted to executable JavaScript by the Angular compiler. You can compile the app in the browser, at runtime, as the application loads, using the just-in-time (JIT) compiler. Or you can use the ahead-of-time (AOT) compiler that can catch template errors and improve performance by compiling at build time.

Why AOT?

  • Faster rendering
  • Fewer asynchronous requests
  • Smaller Angular framework download size
  • Detect template errors earlier
  • Better security

How To Use Angular AOT?

The Angular CLI now automatically builds with AoT enabled if you use the –prod flag. So the easiest way is just to use angular-cli from beginning and when running:

ng build --prod

You are already building with AOT. Another way is go through this really overwhelming documentation.

Related Post

PPTP VPN on MAC OS X Sierra, High Sierra and Mojav... PPTP VPN for Mac OS X Introduction PPTP VPN is no longer supported on macOS Sierra and High Sierra and that is just fine, because there are some se...
Translate Selected Text to English on Right Click ... TL;DR; Need instant translation right in context menu? You can accomplish it for free with one line of code in Automator, or you can proc...
MacBook wifi issue – OS X keeps reconnecting Last few weeks I was facing annoying wifi problems. My mac was reconnecting every 5 minutes. On top of that BSSID was reseting so I saw BSSID changing...
FAQ: Mac OS X Services HEIC to JPG on Right-Click Service Q: Where’d all my services go? I don’t see anything in the Services menu. A: If you don’t select anything before...
Convert HEIC to PNG on Right Click for Free Convert HEIC to PNG on Right-Click In iOS 11 Apple is replacing the PNG image format with the new HEIC alternative. But what to do when device or pr...
Free Better Battery Stats and Time Remaining for M... Better Battery Stats and Time Remaining for Mac OS TL;DR; Do you miss the time remaining indicator on your MacBook, MacBook Air, or MacBook Pro? He...
Buy me a coffeeOut of coffee 😱, please help!