简体   繁体   English

AOT(提前)是Angular 7中的默认编译吗?

[英]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. 我读过一个教程,其中说AOT是Angular 5及更高版本中的默认编译。 I am a bit confused about this. 我对此有些困惑。 I searched on the internet and couldn't find a precise answer. 我在互联网上搜索,找不到准确的答案。

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 对于开发(ng serve),默认值为JIT ...要更改为'aot',您必须将其添加到angular.json中,在项目,服务,选项,选项下

options {
    "aot": true,
}

or simply use ng serve --aot 或者只是使用ng serve --aot

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM