Angular compilation
Angular offers two ways to compile your application:
Ahead-of-Time (AOT)- which compiles your app at build time.
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code.
Just-in-Time (JIT)- which compiles your app in the browser at runtime
JIT compilation is the default when you run the build-only or the build-and-serve-locally CLI commands:
ng build ng serve
For AOT compilation, append the --aot flags to the build-only or the build-and-serve-locally CLI commands:
ng build --aot ng serve --aot
The --prod meta-flag compiles with AOT by default.
Angular offers two ways to compile your application:
Ahead-of-Time (AOT)- which compiles your app at build time.
The Angular Ahead-of-Time (AOT) compiler converts your Angular HTML and TypeScript code into efficient JavaScript code during the build phase before the browser downloads and runs that code.
Just-in-Time (JIT)- which compiles your app in the browser at runtime
JIT compilation is the default when you run the build-only or the build-and-serve-locally CLI commands:
ng build ng serve
For AOT compilation, append the --aot flags to the build-only or the build-and-serve-locally CLI commands:
ng build --aot ng serve --aot
The --prod meta-flag compiles with AOT by default.
Until Angular 8, the default compilation mode was JIT, but from angular 9, the default compilation is AOT. When we do ng serve, it depends on the value of aot passed in the angular.json file.
Hello Mate,
ReplyDeleteNice to be visiting your blog again, it has been months for me. Well this article that i’ve been waited for so long.
I’m working on
Angular2-Meteor, When i use routing inside the meteor account methods data binding is not working for the next route. But when i reload the page using refresh button data binding is working fine.
Below is the code on the client side:
Meteor.loginWithPassword({email:this.usernameCtrl.value},this.passwordCtrl.value,(error,result)=> {
if(error) {
console.log(error);
} else {
this.router.navigate([‘Dashboard’]);
}
});
Awesome! Thanks for putting this all in one place. Very useful!
Many Thanks,
Morgan