Giter Site home page Giter Site logo

RTL layout issue about vantage-ui-template HOT 5 CLOSED

teradata avatar teradata commented on May 31, 2024
RTL layout issue

from vantage-ui-template.

Comments (5)

emoralesb05 avatar emoralesb05 commented on May 31, 2024 2

Yeah, you need to do something like this

  constructor(private _dir: Dir) {
    this._dir.dir = 'rtl';
  }

Since Dir is an angular/material service that is used in the sidenavs

from vantage-ui-template.

mmdsharifi avatar mmdsharifi commented on May 31, 2024 1

Thanks dear @emoralesb05 , It works 😄 .

from vantage-ui-template.

jotatoledo avatar jotatoledo commented on May 31, 2024

not sure if that feature was active on the quickstart repo.
Could you tell me where should I add dir="rtl" to test this locally? 😄

from vantage-ui-template.

mmdsharifi avatar mmdsharifi commented on May 31, 2024

Thanks for your replay, first.

You can add dir="rtl" in src/index.html file. I founded a way to fix it, by overriding the inline styles:

ngAfterViewChecked () {
    let sidenav = document.getElementsByClassName('mat-sidenav-content');
    sidenav[1].style.marginLeft = "0px"
    sidenav[1].style.marginRight = "300px"
  }

but, you know this is not good solution, any better one ?

from vantage-ui-template.

jotatoledo avatar jotatoledo commented on May 31, 2024

there is a similar function implemented on the documentation page of covalent, maybe you could take a look in the source code and take some ideas from that

from vantage-ui-template.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.