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

Regex ng5-breadcrumb addFriendlyNameForRouteRegex #104

Open BenjaminSymanzik opened 6 years ago

BenjaminSymanzik commented 6 years ago

I´m having an issue with ng5-breadcrumb:

/publisher/detail/uu2k6b3v0au5p106l/settings

This doesn´t do anything at all, even when I´m using ^ and $:

breadcrumbService.addFriendlyNameForRouteRegex('/publisher/detail/[a-z0-9]/settings', 'Settings')

This works:

breadcrumbService.addFriendlyNameForRouteRegex('/publisher/detail/[a-z0-9]', 'Settings')

Output: publisher >> detail >> Settings >> Settings

So it matches when there is nothing after the regex but documentation says:

breadcrumbService.addFriendlyNameForRouteRegex('/home/users/[0-9]/info', 'Information');