1
我與角2的材料工作,我要像角2 sidenavlayout父,sidenav兒童
<md-sidenav-layout>
<app-navbar></app-navbar>
<router-outlet></router-outlet>
</md-sidenav-layout>
在app.component.html的sidenav佈局和側導航蒙山它的工具欄外包組件navbar.component.html
<div class="navbar">
<md-sidenav #sidenav mode="side" class="app-sidenav">
<button md-button (click)="sidenav.toggle()">Overview </button>
<button md-button>Deploy</button>
</md-sidenav>
<md-toolbar color="primary">
<button class="app-icon-button" (click)="sidenav.toggle()">
<i class="material-icons app-toolbar-menu">menu</i>
</button>
<!-- This fills the remaining space of the current row -->
<span class="navbar-fill-middle-space"></span>
<button md-button>Login</button>
</md-toolbar>
</div>
我此刻的問題是,父HTML的sidnav佈局不被chield HTML的sidenav認可。有沒有可能像這樣解決它,或者我必須帶着切換欄sidenav進入父母的HTML。感謝您的諮詢