我正在使用角度cli和角度材料2。按钮和工具栏获得正确的设计颜色,但是当我想实现sidenav时,按钮单击将添加一个.mdsidenav-opening
类,但没有css规则。
<md-sidenav-layout fullscreen>
<md-sidenav #sidenav>
<md-nav-list *shellNoRender>
<a md-list-item *ngFor="let view of views">
<md-icon md-list-icon>{{view.icon}}</md-icon>
<span md-line>{{view.name}}</span>
<span md-line>{{view.description}}</span>
</a>
</md-nav-list>
</md-sidenav>
<md-toolbar color="primary">
<button md-icon-button (click)="sidenav.toggle()">
<md-icon>menu</md-icon>
</button>
Puppy Love
</md-toolbar>
<router-outlet *shellNoRender></router-outlet>
</md-sidenav-layout>