In my module when i click a button and use
In my breadcrumb always show the home not home/role
Somebody knows what's the problem?
Hi Vladimir,
We have checked your reported query, using the activeItem property of breadcrumb to achieve your requirements. Please refer to the below code snippet and sample.
|
<ejs-breadcrumb (click)='clickHandler($event)' [enableNavigation]="true" [(activeItem)]="activeItem"> <e-breadcrumb-items> <e-breadcrumb-item text="Home" url="home"></e-breadcrumb-item> <e-breadcrumb-item text="Products" url="/products"></e-breadcrumb-item> <e-breadcrumb-item text="About" url="/products/about"></e-breadcrumb-item> <e-breadcrumb-item text="Team" url="/products/about/team"></e-breadcrumb-item> </e-breadcrumb-items> </ejs-breadcrumb>
clickHandler(args: BreadcrumbClickEventArgs) { if(args.item) { this.router.navigate(args.item.url.split('/')); } }
private initRoutes(): void { this.routesData = this.router.events.subscribe((d) => { const route = this.router.url; this.activeItem = route === '/' ? 'home': route; }); } |
Get back to us if you need any further assistance on this.
Regards,
KeerthiKaran K V
I am also having this issue, but cannot resolve it with active Item. Is there any other advice?
Regards,
Prasanth Madhaiyan.