You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hydration doesn't work with lazy-loaded components when using zoneless change detection #62592
Which @angular/* package(s) are the source of the bug?
platform-server, platform-browser, core
Is this a regression?
No
Description
Hey. Angular hydration doesn't work with lazy loaded components.
Start my repro and navigate to http://localhost:4200/non-lazy - you will see this in console:
Angular hydrated 2 component(s) and 12 node(s), 0 component(s) were skipped
changed the title [-]Hydration doesn't work with lazy-loaded components[/-][+]Hydration doesn't work with lazy-loaded components when using zoneless change detection[/+]on Jul 11, 2025
Confirmed that hydration is not working with lazy loaded components when zoneless change detection is used. Hydration does work with zones in this case.
Update: We're not sure what the actual cause is, but we do know that you can work around this issue by putting provideRouterbefore you `provideClientHydration_ in your app config list. This only affects zoneless apps. We were able to confirm that switching that order does cause hydration to work just fine. We'll look further into why this ordering of providers matters for zoneless apps and how we can fix it.
Activity
[-]Hydration doesn't work with lazy-loaded components[/-][+]Hydration doesn't work with lazy-loaded components when using zoneless change detection[/+]thePunderWoman commentedon Jul 11, 2025
Confirmed that hydration is not working with lazy loaded components when zoneless change detection is used. Hydration does work with zones in this case.
thePunderWoman commentedon Jul 11, 2025
Update: We're not sure what the actual cause is, but we do know that you can work around this issue by putting
provideRouterbefore you `provideClientHydration_ in your app config list. This only affects zoneless apps. We were able to confirm that switching that order does cause hydration to work just fine. We'll look further into why this ordering of providers matters for zoneless apps and how we can fix it.fix(core): fixes race condition for zoneless apps
fix(core): Ensure application remains unstable during bootstrap
fix(core): Ensure application remains unstable during bootstrap
fix(core): Ensure application remains unstable during bootstrap (#62631)
fix(core): Ensure application remains unstable during bootstrap (angu…
angular-automatic-lock-bot commentedon Aug 15, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.