andrey.shedko
andrey.shedko

Reputation: 3238

Angular 2 extending component - how to inherit styles

I want to extend component and override its html template only, but left all logic and styles. Unfortunately I see that all styles defined in parent component was not inherited. Is there the way to use styles of the component that was extended? P.S. This is comoponent defined in node_modules, so I can edit source code.

Upvotes: 3

Views: 652

Answers (1)

mrtaz
mrtaz

Reputation: 444

If you want to bleed styles down to a component. You would put this on your target component.

   @Component({
    encapsulation: ViewEncapsulation.None
  })

Upvotes: 1

Related Questions