材料2 - md-sidenav不能从右到左打开

时间:2017-08-10 11:34:30

标签: angular angular-material2

我希望侧面导航从右到左打开。我使用了align属性并将其设置为" rtl"但它不起作用。

<md-sidenav-container class="example-container">
  <div class="example-sidenav-content">
    <button type="button" md-button (click)="sidenav.open()">
      Open sidenav
    </button>
  </div>
  <md-sidenav align="rtl" #sidenav class="example-sidenav">
    Jolly good!
  </md-sidenav>
</md-sidenav-container>

链接:https://material.angular.io/components/sidenav/overview

1 个答案:

答案 0 :(得分:1)

align将'start'或'end'作为值。改变你的html t0:

<md-sidenav align="end" #sidenav class="example-sidenav">
    Jolly good!
</md-sidenav>

PLUNKER DEMO HERE