Thursday, 8 March 2018

Angular 4 Compiler

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.                                                          

1 comment:

  1. Hello Mate,


    Nice 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

    ReplyDelete

Topics

ADO .Net (2) Ajax (1) Angular Js (17) Angular2 (24) ASP .Net (14) Azure (1) Breeze.js (1) C# (49) CloudComputing (1) CMS (1) CSS (2) Design_Pattern (3) DI (3) Dotnet (21) Entity Framework (3) ExpressJS (4) Html (3) IIS (1) Javascript (6) Jquery (9) Lamda (3) Linq (11) Mongodb (1) MVC (48) NodeJS (7) RDLC (1) Report (1) Sql Server (29) SSIS (3) SSRS (2) UI (1) WCF (12) Web Api (9) Web Service (1) XMl (1)