AOT编译是angular@4.0.0的默认设置吗? [英] Is the AOT Compilation the default on angular@4.0.0?

查看:73
本文介绍了AOT编译是angular@4.0.0的默认设置吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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

我遇到了一些类似AoT编译错误的问题: 属性"myModel"是私有的,只能在类"MyComponent"中访问.

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

ps .:仅在 ng build -target = production

我认为在JIT编译时不应发生此类错误...

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

推荐答案

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

这篇关于AOT编译是angular@4.0.0的默认设置吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆