我在版本2.2.3中使用了角度并始终保持良好。 当我升级到版本2.4.4时出现了一个错误(下图中的错误)。Angular2错误:无法将undefined或null转换为对象
下班后搜索发生了什么我发现这个问题是因为没有更多的可能使用功能() => ExampleModule
属性loadChildren的路由器。
为了使用这个我需要更改loadchildren:() => ExampleModule
到loadchildren: 'path/example.module#ExampleModule'
,并且角度按预期工作。
Now i want know if the function type() => is not more supported to use or this happened because i created a error ?
谢谢你的帮助。我知道字符串模式和函数已经在很久以前使用过了,但是我提出了这个问题,因为在angular site中没有关于函数模式的更多解释,只有字符串模式。 现在即时通讯不使用AOT,但一切按预期工作,我会继续用字符串模式写。 https://angular.io/docs/ts/latest/guide/router.html#!#asynchronous-routing – Carlinhos