mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
This code mimics behavior that Google Analytics has been using to prevent duplicate navigations. They set up their own `HybridRoutingService` location sync to avoid duplicate navigations that came from the Angular router. This would happen because the Angular router would trigger a navigation, which would then get picked up by the `$locationShim`, which would trigger a `$locationChangeStart`, which would then be picked up by the `setUpLocationSync` watcher here, which would again trigger a navigation in the Angular Router. All of this can be prevented by checking if the `navigationId` exists on the history state object. This property is added by the Angular router during navigations. fixes #21610 PR Close #43441 |
||
|---|---|---|
| .. | ||
| BUILD.bazel | ||
| upgrade.spec.ts | ||
| upgrade_location_test_module.ts | ||