You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improvement: dynamic breadcrumb 'displayName' from Routing #17
Or a Dynamic displayName: { path: ':yearId/:monthId/:dayId', component: SubhomeComponent, data: { breadcrumb: 'SubHome with Year :id Month :monthId Day :dayId} }
Thanks for the suggestion @aalmajanob - angular-crumbs has something baked in for this - you can set dynamic crumbs based on route values using the BreadcrumbService.changeBreadcrumb method:
this.route.params.subscribe(params => {
const year = params['id'];
const month= params['monthId'];
const day = params['dayId'];
this.breadcrumbService.changeBreadcrumb(this.route.snapshot, `SubHome with Year ${year} Month ${month} Day ${day}`);
});
The demo app also has an example where the crumb is set based on the :org and :repo parameters for a github repo.
Yes I saw this feature. It is perfect when you need a complex name, but It requires some subscriptions and reloading the items list which is much less efficient when you only requiere to use the route param!
I tried implementing your breadcrumb component in my application and I was successful in it.
The only thing I want to know that, how to add child routes of a particular module.
Home User Manage User Add User Update user
The above is my routing structure.
User is a module under which there are several children components.
Now, what I want is, my breadcrumb to come like the below.
Home > ManageUser > Adduser (when I am navigating to Adduser from manageuser on a button click)
or, if I am updating
Home > ManageUser > Updtateuser(when I am navigating to UpdateUse from manageuser on a button click)
I have attached my solution where i implemented your breadcrumb component.
Please go through my application and provide me some solutions .Before run my application please run command npm install BreadCrumb.zip
Activity
emilol commentedon Nov 24, 2018
Thanks for the suggestion @aalmajanob -
angular-crumbshas something baked in for this - you can set dynamic crumbs based on route values using theBreadcrumbService.changeBreadcrumbmethod:The demo app also has an example where the crumb is set based on the
:organd:repoparameters for a github repo.aalmajanob commentedon Nov 24, 2018
Hi emilol!,
Yes I saw this feature. It is perfect when you need a complex name, but It requires some subscriptions and reloading the items list which is much less efficient when you only requiere to use the route param!
Regards,
Sunanda94 commentedon Mar 14, 2019
Hi @emilol
I tried implementing your breadcrumb component in my application and I was successful in it.
The only thing I want to know that, how to add child routes of a particular module.
Home
User
Manage User
Add User
Update user
The above is my routing structure.
User is a module under which there are several children components.
Now, what I want is, my breadcrumb to come like the below.
Home > ManageUser > Adduser (when I am navigating to Adduser from manageuser on a button click)
or, if I am updating
Home > ManageUser > Updtateuser(when I am navigating to UpdateUse from manageuser on a button click)
I have attached my solution where i implemented your breadcrumb component.
Please go through my application and provide me some solutions .Before run my application please run command npm install
BreadCrumb.zip