After clicking on mat-menu-item (Item1), nothing happens. I am sure that the router is configured properly, because it works if put anywhere else in the code. The weirdest thing is, that it was working, and after refreshing the browser it stopped working.
Nesting it inside nav element does not help
<mat-toolbar color = "primary" class = "subheader-menu mat-elevation-z4">
<span class = "menu_button">
<button mat-button [matMenuTriggerFor]="menu">Vehicles</button>
<mat-menu #menu="matMenu">
<button mat-menu-item [routerLink] = "['/example']">Item 1</button>
<button mat-menu-item>Item 2</button>
</mat-menu>
</span>
</mat-toolbar>
I would like it to display the component that is bound to /example path.