peterbsmyth / ngx-breadcrumbs

Angular 4+ routing breadcrumbs
MIT License
60 stars 43 forks source link

Force the update of breadcrumbs without route change #8

Closed lifter035 closed 6 years ago

lifter035 commented 6 years ago

Just wondering is it possible to force the update of the breadcrumbs without route change. I need to update some of the breadcrumbs on language change

lifter035 commented 6 years ago

Closing this, resolved by creating custom component

crissty commented 5 years ago

@lifter035 How did you force the update of the breadcrumbs, I am using a resolver to generate the breadcrumb, but I need that the resolver executes again when the language changes. I have added a ngIf directive, but the resolver is not executed again, so the breadcrumbs are in the previous language.

lifter035 commented 5 years ago

@crissty I have since moved away from this lib as I had problems with lazy loaded modules and paths. But what I did at the time was to create my own BreadCrumbsComponent where I subscribed to my translation lib translationChanged observable and replaced the text of the first crumb with translated value. I only needed first crumb translated in some cases as in my case it is file browsing UI