Skip to main content

Posts

Showing posts with the label AOT vs JIT Compiler Angular

Angular 8, Why compile with AOT? When?

What Is the Angular Compiler? Explore… Why compile with AOT? When? 1.       Faster rendering 2.       Fewer asynchronous requests 3.       Smaller Angular framework downloads size 4.       Detect template errors earlier 5.       Better security When you use the Angular AOT compiler? When you use the Angular AOT compiler , you can control your app compilation in two ways: 1.       By providing template compiler options in the tsconfig.json file 2.       By specifying Angular metadata In the following example, the @Component() metadata object and the class constructor tell Angular how to create and display an instance of UserComponent. import { Component , OnInit } from '@angular/core' ; @ Component ({   selector: 'app-user' ,   template: '<h2>A User comp...

AOT vs JIT Compiler - What Is the difference between JIT compiler and AOT compiler?

What Is the Angular Compiler? The Angular compiler converts our applications code ( HTML and TypeScript ) into JavaScript code before browser downloads and runs that code. JIT (Just-in-Time) - 1.       JIT compiles our app in the browser at run-time. 2.       Compiles before running 3.       Each file compiled separately 4.       No need to build after changing our app code and it automatically reflects the changes in your browser page 5.       Highly secure 6.       Very suitable for local development AOT (Ahead-of-Time) - 1.       AOT compiles our app code at build time. 2.       Compiles while running 3.       Compiled by the machine itself, via the command line (Faster) 4.       All code compiled togeth...