angularangular2-aot

Is AOT (ahead of time) the default compilation in Angular 7


I have read in a tutorial that says AOT the default compilation in Angular 5 and above. I am a bit confused about this. I searched on the internet and couldn't find a precise answer.


Solution

  • it is for production. For development (ng serve) the default is JIT... to change to 'aot' you have to either add to your angular.json, under the project, serve, options, the option

    options {
        "aot": true,
    }
    

    or simply use ng serve --aot