Angular 2 - Can't resolve all parameters for component: (?)

前端 未结 4 641
死守一世寂寞
死守一世寂寞 2021-01-12 06:47

I started an Angular2 app and I have an issue since days !

Can\'t resolve all parameters for HomeComponent: (?).(…) 

But my issue is not a

4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-12 07:12

    The issue that raised this error for me was completely different. I had a logging category in the component that I had mistakenly used in the service, and thus the service had a dependency on the component and wasn't able to be created in time for it to be injected into the component.

    TL;DR: Check the imports on the service that can't be injected.

提交回复
热议问题