0
I tried to put the menu of Material Design, but I was not successful. Please someone has how to check if something is wrong with my code?
angular js.
"styles": [
"src/styles.scss",
"src/customTheme.scss",
"node_modules/material-design-icons/iconfont/material-icons.css"
],
The page.
<mat-sidenav-container class="sidenav-container">
<mat-sidenav #drawer class="sidenav"
fixedInViewport="false"
[attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'"
[mode]="(isHandset$ | async) ? 'over' : 'side'"
[opened]="(isHandset$ | async) === false">
<mat-toolbar>Menu</mat-toolbar>
<mat-nav-list>
<a mat-list-item href="#">Link</a>
<a mat-list-item href="#">Link</a>
</mat-nav-list>
</mat-sidenav>
<mat-sidenav-content>
<mat-toolbar color="primary">
<button
type="button"
aria-label="Toggle sidenav"
mat-icon-button
(click)="drawer.toggle()"
*ngIf="(isHandset$ | async)!.matches">
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
</button>
<span>
<img class="logo" src="/assets/img/logo-animal.svg" alt="image">
</span>
<span class="spacer"></span>
<div class="menu_dimension">
<a href="#">Link</a>
<a href="#">Link</a>
</div>
</mat-toolbar>
<!-- Add Content Here -->
</mat-sidenav-content>
</mat-sidenav-container>
The tag mat-icon not caught at all.
vc imported import {Maticonmodule} from '@angular/material/icon'; in the module you are using mat-icon?
– Eduardo Vargas
Yes I did import
– wladyband