gmostert / ng2-breadcrumb

This is an angular 2 component that creates a breadcrumb trail. It hooks into the angular2/router, to dynamically build up the crumb trail once a component is routed to.
MIT License
102 stars 81 forks source link

Support readonly/deactivate for route #63

Open reberinformatik opened 7 years ago

reberinformatik commented 7 years ago

We have some routes, that contain non navigatable paths. I.e.

Overview > Record Nr. 1 > Contact Info > Address

Here Record Nr. 1 isn't a route that can be navigated to. So instead of hiding it, we would like to make it readonly/deactivated (= non clickable). Is there a workaround or planned feature for this?

Thanks!

vamsi981 commented 6 years ago

Any workarounds for the above issue

reberinformatik commented 6 years ago

You can inherit from BreadcrumbComponent and use your own template. See this gist . Note that we completely disabled links in the breadcrumb. However, you can adapt this logic to build your own path. It would be nicer indeed, to replace the _urls property with a complex type (currently its a string) which can hold information about visibility.