surendra
surendra

Reputation: 31

Angular 15 - router.events are empty with nested router outlets on page refresh

I have the following structure:

App component with router outlet. Layout component with router outlet (created in outlet of app component). Customers component

App component -> router outlet -> Layout component -> router outlet -> Customers component

When the user navigates from orders to customers then router.events are not empty it has the following events

  1. NavigationStart
  2. ChildActiationStart
  3. ChildActivationEnd
  4. NavigationEnd

But on Page refresh (/customers) router.events are empty

this is working fine with angular 14.3.0 . It is not working since angular 15.0.0. This is only happening with router-outlet inside router-outlet. I have a use case where i have to find subscribe to router events and look for router config path and outlet.

stackblitz url to replicate - https://stackblitz.com/edit/stackblitz-starters-9kou58?file=src%2Fapp%2Fcustomers%2Fcustomers.component.ts

Upvotes: 0

Views: 35

Answers (0)

Related Questions