rajaramtt / ng7-dynamic-breadcrumb

Angular 10 Dynamic Breadcrumbs
MIT License
42 stars 31 forks source link

Fix breadcrumb not dynamically updating #6

Closed canpan14 closed 3 years ago

canpan14 commented 5 years ago

Don't expect you to straight merge this in. This is showing how to fix the issue in https://github.com/rajaramtt/ng7-dynamic-breadcrumb/issues/5

The issue was you would override the label field which held the {{}} used to know how to replace the text. So if the labels were updated again without a page change, it wouldn't know how to replace text anymore. There are a number of ways you could store the original labels so they don't get overridden. I just did a quick example.

I'll leave comments on the important lines, apologies that prettier took over and did some reformatting.