Error encountered resolving symbol values statically. Calling function 'CreateCustomComponent', function calls are not supported

折月煮酒 提交于 2019-12-06 08:09:43
Stephen Paul

I had this problem too after upgrading my CLI version. It has something to do with the AOT compiler.

You can fix this by exporting and wrapping your function in another function in your app module (must be app module), and then using the exported function like so:

export function doCreateCustomComponent(){
  return CreateCustomComponent(...);
}

@NgModule({ ... 
declarations: [doCreateCustomComponent], 
bootstrap: [doCreateCustomComponent]
... })
export class AppModule { }

(I've simplified your code slightly)

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