Skip to content

Instantly share code, notes, and snippets.

@shhdharmen
Last active January 30, 2019 06:17
Show Gist options
  • Save shhdharmen/235c590fdf090216aa87d79691267066 to your computer and use it in GitHub Desktop.
Save shhdharmen/235c590fdf090216aa87d79691267066 to your computer and use it in GitHub Desktop.
<mat-toolbar [color]="themeColor">
Toolbar
</mat-toolbar>
<mat-sidenav-container class="example-container">
<mat-sidenav #sidenav mode="side" opened>
Sidenav content</mat-sidenav>
<mat-sidenav-content>
<ng-content></ng-content>
</mat-sidenav-content>
</mat-sidenav-container>
.example-container {
height: 500px;
}
import { Component, OnInit, Input } from '@angular/core';
@Component({
selector: 'app-sidenav',
templateUrl: './sidenav.component.html',
styleUrls: ['./sidenav.component.scss']
})
export class SidenavComponent implements OnInit {
@Input() themeColor = '';
constructor() { }
ngOnInit() {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment