ngUpgrade hybrid location owner during AngularJS route migration
0 reputation · 29 Dec 2025, 14:45 UTC
AngularJS hybrid router location ownership
The goal is to run AngularJS 1.x and Angular side by side with ngUpgrade while keeping the application available, and to declare exactly which framework owns browser location changes during incremental route migration.
In hybrid mode, either the AngularJS $router or the Angular Router can be designated as the location owner, but only one framework should respond to URL changes. AngularJS 1.5 or later with a component-based structure is assumed. Shared services upgraded through ngUpgrade remain AngularJS singletons until explicitly downgraded, which can affect state timing across the router boundary.
It is unclear how to enforce single location ownership when AngularJS and Angular versions of the same route are split behind feature flags, and whether route-level splitting alone prevents competing navigation events during cutover.
Which framework should be set as the location owner when migrating routes one at a time without downtime? Does route-level feature-flag splitting guarantee that only one router handles a given URL change? What happens to shared upgraded service state when navigation crosses the AngularJS-to-Angular router boundary?