Angular 2 AoT编译会导致应用程序问题并在JiT中正常工作(Angular 2 AoT compile causes application issues and works fine in JiT)
我遵循了Angular 2的例子:
https://angular.io/docs/ts/latest/cookbook/aot-compiler.html使用ngc AoT编译应用程序后,路由不起作用,它只停留在同一页面上,没有任何反应。
由于应用程序确实加载了它甚至太奇怪了,甚至在使用tsc进行JiT编译和使用ngc进行AoT编译时,可能会出现错误。
我不认为粘贴代码会帮助这里,但我想知道如果你知道任何工具或调试功能,我可以在应用程序处于AoT模式时使用。
I've followed the Angular 2 example from:
https://angular.io/docs/ts/latest/cookbook/aot-compiler.htmlAfter compiling the application using ngc AoT the routing doesn't work, it just stays on the same page and nothing happens.
Since the application does load it's too strange to even think of something that might be wrong when JiT compiling with tsc works and AoT compiling with ngc not.
I dont think pasting bits of code will help here but I was wondering if you know of any tool or debug feature I can use when the app is in AoT mode.
原文:https://stackoverflow.com/questions/40404713