DEV Community

Discussion on: Use Angular directives to extend components that you don't own

Collapse
 
asac2142 profile image
Andrés Albán Carvallo • Edited

Great article Tim, a humble question, how can you inject a component like that? I mean, is that correct? Shouldn't those components been declared somewhere in a providers array of a certain module? but they are not services... I'm confused : )

Collapse
 
timdeschryver profile image
Tim Deschryver

It's how the Angular DI works. A child can always reference its parent ( I think ) by injecting the parent into the child