Angular and Material Multi-level Menu with Breadcrumb not working properly

Multi tool use
Multi tool use


Angular and Material Multi-level Menu with Breadcrumb not working properly



I am working with angular 6 and angular material 6. Here i am trying to create multilevel menu with breadcrumb. I have worked multilevel menu with properly but can not able to navigate menu with selected breadcrumb. When i click on the selected breadcrumb then the menu not getting organized appropriately.



My demo link : stackblitz link here




1 Answer
1



@hi Monir tuhin



You can try this Solution.



I Have create a demo on Stackblitz.



Component.ts


breadCrumb(menu, index) {
console.log('sub breadCrumb');
this.menuHeader.splice(index + 1, this.menuHeader.length - 1);
if (menu[index] && menu[index].items && menu[index].items.length) {
this.appitemsTravel = menu[index].items;
}
}



Component.html


<mat-toolbar color="primary" style="height: 45px; font-size: 16px; font-weight: bold; color: #E6E8EA">
<span><a mat-button (click)="breadCrumbMain()" style="color: white;">Main</a></span>
<span *ngFor="let m of menuHeader; let indx = index" style="color: white;">
<a mat-button (click)="breadCrumb(menuHeader, indx)" >{{m.label}}
<mat-icon fxFlex="10">{{m.icon}}</mat-icon></a>
</span>
</mat-toolbar>





Thanks again @Krishna Rathore. You have done great work. I have tried a lot of times but could not able to fix it. You save my lot of times.
– monir tuhin
Jul 3 at 3:55






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

hbD,V9qKmKFsHK,gUZXmISqGRouWf7r4xxSxyIgj,2QHMq53SpgrOE,bG jJ,duR7eQW eloZ,wAGZ49Xez,e5CDU5e6RenhsF
rVwk EqBKV pAb3NHn VOJxxC,hyJ9b9TnQL,iRs7OizPY,ZuQyaiI 1Tr81NWcbzJ8xRkg

Popular posts from this blog

Rothschild family

Cinema of Italy