Currently I try to embed a Sidenav using mat-sidenav-container but the content in mat-sidenav-conent is not shown on the Website (using localhost). The Tutorial im watching does exactly the same and shows the "Main" when loaded. Did I miss something? The Hello World is shown as usual.
app.component.html
<body>
<p>Hello World</p>
<mat-sidenav-container>
<mat-sidenav>Sidenav</mat-sidenav>
<mat-sidenav-content>Main</mat-sidenav-content>
</mat-sidenav-container>
</body>
app.component.ts
import { Component } from '@angular/core';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'testfile_3';
}
app.module.ts
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { MatSidenavModule } from '@angular/material/sidenav';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
MatSidenavModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }