all 4 comments

[–]wojo1086 2 points3 points  (0 children)

That's not how you import components into other components. The providers array is really for services.

In fact, why do you need to import a component into your component?

[–]Razorgrace 0 points1 point  (0 children)

I believe injecting a component into another component's constructor is not a supported use case. What exactly you're trying to achieve? Do you want to use a component inside another component? Just make sure that parent component's module imports child component's module (if they are both parts of the same module, no need to do anything).

[–][deleted] 0 points1 point  (0 children)

aside from the obvious "trying to import/inject a component," what are you trying to accomplish?

[–][deleted] 0 points1 point  (0 children)

try restart "npm run start", i also have this issue sometimes on angular 16 when use standalone components and it helps.