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
80
forks
source link
Callback function with route parameters does not work as documented #35
breadcrumbService.addCallbackForRoute('/home/users/1', this.getNameForUser);
breadcrumbService.addCallbackForRouteRegex('^/home/users/[0-9]$', this.getNameForUser);
getNameForUser(id:string):string {
return 'specific name for user with id';
}
C&P from the documentation, I get an error
Argument of type '(id: string) => string' is not assignable to parameter of type '() => string'.
Is this intentional? Looks as if the "regex"-Functions only accept parameterless functions for the callback.
When I do this
C&P from the documentation, I get an error
Is this intentional? Looks as if the "regex"-Functions only accept parameterless functions for the callback.