Angular2材料复选框,工具栏,nd按钮组件随css一起显示。但sidenav没有用css显示。上面提供的图片。
来自
的代码 <md-sidenav-layout fullscreen>
<md-sidenav #start (open)="mybutton.focus()">
Start Sidenav.
<br>
<button md-button #mybutton (click)="start.close()">Close</button>
</md-sidenav>
<md-sidenav #end align="end">
End Sidenav.
<button md-button (click)="end.close()">Close</button>
</md-sidenav>
My regular content. This will be moved into the proper DOM at runtime.
</md-sidenav-layout>
My regular content. This will be moved into the proper DOM at runtime.
</md-sidenav-layout>
组件文件
import { Component } from "@angular/core";
import { MdSidenav } from '@angular2-material/sidenav';
import { MdCheckbox } from '@angular2-material/checkbox';
import { MdButton } from '@angular2-material/button';
import { MdToolbar } from '@angular2-material/toolbar';
@Component({
selector: "my-sidebar",
templateUrl: "app/sidebar.component.html",
directives: [MdCheckbox, MdSidenav, MdButton, MdToolbar]
})
export class SidebarComponent {
}