作者热门文章
- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
当使用 isDevMode() 时,JIT 构建工作正常,而 AOT 声明失败
Error: Error encountered resolving symbol values statically. Calling function 'isDevMode', function calls are not supported. Consider replacing the function or lambda with a reference to an exported function
尝试创建这样的导出函数,但没有成功
export function isDevModeEnabled() {
return isDevMode();
}
最佳答案
所以我也遇到了这个错误,并提出了一个问题here . Angular 2 开发团队的官方回应是这不是一个错误:
I believe this is an intended behaviour. The solution is to move isDevMode() out of the annotation. (By defining to a variable)
官方的解决方案是:
[...] You will need to set the return value to a variable, and use the variable rather than calling the function when wiring up the NgModule.
关于使用 isDevMode 的 Angular AOT 给出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46363596/
我有一个经典的 ASP 页面 (VBscript),它在服务器端生成 XML,然后 Response.Writes。该页面根本没有客户端。 但是我需要将其转换为 JSON。由于我找不到有效的 ASP
我想从客户端应用程序的 HDFS 中读取特定的 SequenceFile。我可以使用 SequenceFile.Reader 来做到这一点,它工作正常。但是是否也可以通过分析抛出的 IOExcepti
我是一名优秀的程序员,十分优秀!