Reputation: 15598
I have installed angular-material2 and this is the package.json entry
"@angular/material": "^2.0.0-beta.7",
then in my app.module.ts imported
import { MaterialModule } from '@angular/material';
and @NgModule
@NgModule({
imports: [BrowserModule, MaterialModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
I have created a component that shows side navigation bar using angular material 2. This is the html code
<md-sidenav-container>
<md-sidenav mode="side" opened="true">
<md-list-item>
<button md-icon-button>
<md-icon class="material-icons md-24 white-icon">dashboard</md-icon>
</button>
</md-list-item>
</md-sidenav>
</md-sidenav-container>
All other compnents of angular material 2 is working fine. But when I place my md-sidenav
inside md-sidenav-container
there is no navigation bar on view. But when directly use md-sidenav
without the container it works. But could be the issue?
Upvotes: 1
Views: 2697
Reputation: 410
Update: the import is now outdated. It is now:
import { MatSidenavModule} from '@angular/material';
Upvotes: 0