Angular 2 AOT not like moduleId in my components

僤鯓⒐⒋嵵緔 提交于 2019-12-01 10:20:57

问题


How do I get around this?

As far as I know, JIT needs moduleId's on the components to find the template and styles if the component has one.

However, AOT doesnt use module and you get a "Cannot find name 'module'" error when compiling for AOT.

I don't want to go through all my modules and remove the Id for AOT, as I use JIt for DEV and AOT for production release only in order to get the performance benefits.

I've used the new angular 4 seed app for this: https://angular.io/docs/ts/latest/guide/setup.html

来源:https://stackoverflow.com/questions/43210191/angular-2-aot-not-like-moduleid-in-my-components

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