Is AOT compiling by default on angular @ 4.0.0?

Is compilation of AOT by default on angular @ 4.0.0 and angular / cli@1.0.0 ? We are porting our applications today, and I do not know that his documents are still valid: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html

I am having problems with AoT compilation errors: The 'myModel' property is private and is only available in the 'MyComponent' class.

ps .: The error appears only with ng build -target = production

I think this kind of error should not occur when compiling JIT ...

+5
source share
1 answer

Because @angular/ cli@1.0.0-beta.28 , they made the default AOT compilation for production collections. If you do not want this (although I strongly recommend that you make the AOT application compatible for performance reasons), you can use the --aot=false argument for your build command

+6
source

Source: https://habr.com/ru/post/1265889/


All Articles