I would like to create a Breadcrumb
.
And for this, I thought about creating a Service to handle it. But I need to hook each router changes, a method or a class that will be used everytime the router state change.
This challenge have to be resolved without adding a onActivate method in all my components because I have a lot of them.
Great thanks !
Angular 7 made the
events
into anObservable
, so you'll need to use different code to filter for theNavigationEnd
event.See https://angular.io/api/router/RouterEvent for details.