skip to Main Content

I have a component which contain element with class hello, this component is render in almost 2 more components but each component has it’s own requirement of height. How can I do this in angular. Components have no relation

I tried the encapsulation and global styling then updating locally but nothing work

2

Answers


  1. You can Handle it by using @Input() and conditions

    Login or Signup to reply.
  2. To address varying height requirements for the same class in Angular components with no relation, consider using ViewEncapsulation.None and applying specific styles directly in each component’s styleUrls. This allows independent styling without encapsulation.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search