MCPcopy Create free account
hub / github.com/angular/angular / constructor

Method constructor

packages/router/src/router.ts:179–190  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

177 readonly currentNavigation = this.navigationTransitions.currentNavigation.asReadonly();
178
179 constructor() {
180 this.resetConfig(this.config);
181
182 // Subscribe to navigation events before adding `setupNavigations` to `eventsSubscription`
183 // so `dispose()` unsubscribes the event listener before tearing down active transitions.
184 this.subscribeToNavigationEvents();
185 this.eventsSubscription.add(
186 this.navigationTransitions.setupNavigations(this).subscribe({
187 error: () => {},
188 }),
189 );
190 }
191
192 private eventsSubscription = new Subscription();
193 private subscribeToNavigationEvents() {

Callers

nothing calls this directly

Calls 5

resetConfigMethod · 0.95
setupNavigationsMethod · 0.80
addMethod · 0.65
subscribeMethod · 0.65

Tested by

no test coverage detected