Is the AOT Compilation the default on angular@4.0.0?

别说谁变了你拦得住时间么 提交于 2019-12-18 13:29:15

问题


Is the AOT Compilation the default on angular@4.0.0 and angular/cli@1.0.0 ? We are migrating our apps today, and i don't know wheter its docs are still valid: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html

I'm having some issues that appears with AoT Compilations errors like that: Property 'myModel' is private and only accessible within class 'MyComponent'.

ps.: It's error only appears with ng build -target=production

I think wich this kind of error should not occurs on JIT Compilation...


回答1:


Since @angular/cli@1.0.0-beta.28 they've made the AOT compilation the default for production builds. If you do not want that (even though I strongly advice you for performance reasons to make your app AOT compatible), you can use the --aot=false argument for your build command



来源:https://stackoverflow.com/questions/43007872/is-the-aot-compilation-the-default-on-angular4-0-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!