Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Callback being endlessly called #71

Open
mslicee opened this issue Jul 5, 2017 · 1 comment
Open

Callback being endlessly called #71

mslicee opened this issue Jul 5, 2017 · 1 comment

Comments

@mslicee
Copy link

mslicee commented Jul 5, 2017

Hi, I have a route which gets an object based on a C# Guid. I am trying to implement the breadcrumb service to show the object's name as part of the breadcrumbs. However, for some reason, the getEventName Method is being called endlessly. Do you have any ideas on what I might be missing?

constructor(private breadcrumbService: BreadcrumbService, private route: ActivatedRoute, private router: Router, private eventService: EventService) { breadcrumbService.addFriendlyNameForRoute('/event', 'Event List'); breadcrumbService.addFriendlyNameForRoute('/event/create', 'Create'); breadcrumbService.addFriendlyNameForRoute('/event/update', 'Update'); breadcrumbService.addCallbackForRouteRegex('\/event\/update\/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}', this.getEventName); }

getEventName(id:string):string { debugger; return 'specific name for user with id'; }

Example URL: http://localhost:4200/event/update/d7b01d81-7b4c-4e20-9562-7e14019a1fd8

@garrylachman
Copy link

saw this issue too..
this is worked for me
change
this.getBreadCrumbsName
to
(id) => this.getBreadCrumbsName(id)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants