angular@4.0.0 上的 AOT 编译是默认的吗?

Is the AOT Compilation the default on angular@4.0.0?

AOT 编译是 angular@4.0.0 和 angular/cli@1.0.0 上的默认编译吗? 我们今天正在迁移我们的 apps,我不知道它的文档是否仍然有效: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html

我在 AoT 编译错误中遇到了一些问题,例如: 属性 'myModel' 是私有的,只能在 class 'MyComponent'.

内访问

ps.: 它的错误只出现在 ng build -target=production

我认为这种错误不应该发生在 JIT 编译...

@angular/cli@1.0.0-beta.28 以来,他们已将 AOT 编译设为生产构建的默认编译。如果您不希望这样做(尽管出于性能原因我强烈建议您使您的应用程序与 AOT 兼容),您可以为构建命令使用 --aot=false 参数