Search code examples
htmlangularright-to-left

How to change the default positioning of Angular HTML files from "left-to-right" to "right-to-left"?


I am interested to know if there is a way to change the default positioning of Angular HTML files from "left-to-right" to "right-to-left"?

If there isn't a way for that, what is the best way to do it?

I want when I create my HTML views on the position of the elements from right-to-left.


Solution

  • On your parent html element, you could use CSS flexbox layout with flex-direction: row-reverse.

    .container {
      display: flex; 
      flex-direction: row-reverse;
    }
    

    Please consult https://css-tricks.com/snippets/css/a-guide-to-flexbox/ for excellent detailed information about CSS flexbox layout.