0

I have two css file for arbaic layout and english layout , so I want to conditionally change the styleurl in component . is possible or not ?

Arshad N
  • 11
  • 2
  • can't... but can use ngClass at the very top to make theme type changes; kinda like https://stackoverflow.com/questions/53077314 – Akber Iqbal Jul 03 '19 at 08:59
  • 1
    what you tried so far? feel free to share your code so we will get batter idea what want wrong – Yash Rami Jul 03 '19 at 09:05

1 Answers1

1

you cannot put a condition in the styleUrls attribute of the component, but instead, you can use something like that:

.some-class {
  // your css style
}

//  arabic css  overrides
._ar {
   .some-class {
    direction: rtl;
   }
}



<div class="parent" [class._ar]="your_condition">
    <textarea class="some-class">
    </textarea>
</div>
Benzara Tahar
  • 2,058
  • 1
  • 17
  • 21