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 for Pattern with Activated Route like bills?id=123 #110

Open johnny68 opened 5 years ago

johnny68 commented 5 years ago

So, I was trying to use this with my dynamic URL The regex that I am trying to work with is

\/users\/bills\?id=[0-9]+$

It is valid at https://regex101.com/r/rmYFfG/1 I tried to follow this Link but it didn't work. Further I tried breadcrumbService.addCallbackForRouteRegex('/users/bills\?id=[0-9]+$', this.getName); getName(id: string): string { return 'User : ' + id; }

But it still not working Output is always like

users/bills?id=1