Error: (SystemJS) Can't resolve all parameters for ActivatedRoute: (?, ?, ?, ?, ?, ?, ?, ?)

[亡魂溺海] 提交于 2019-11-29 13:29:31

Remove providers: [ActivatedRoute] from @Component() there is no need for that. RouterModule.forRoot() already provides everything that is required.

To extend @günter-zöchbauer's answer. Make sure that you added RouterModule to property exports of @NgModule. Directives/pipes/modules specified in exports will be

used within the template of any component that is part of an Angular module that imports this Angular module.

i.e. in all child components of the module.

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