DEV Community

Discussion on: Composing Angular Components with Typescript Mixins

Collapse
 
gc_psk profile image
Giancarlo Buomprisco

Hi Lars, thanks a lot again!

If you use a Mixin, you don't really need to re-inject the dependency, but you do need to tell TS that the class to which the mixin is applied to does have that particular service/type.

For example, Angular Material uses interfaces such as "HasElementRef" (github.com/angular/components/blob...)