MCPcopy Index your code
hub / github.com/angular/angular / init

Method init

packages/router/src/router_scroller.ts:74–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72 }
73
74 init(): void {
75 // we want to disable the automatic scrolling because having two places
76 // responsible for scrolling results race conditions, especially given
77 // that browser don't implement this behavior consistently
78 if (this.options.scrollPositionRestoration !== 'disabled') {
79 this.viewportScroller.setHistoryScrollRestoration('manual');
80 }
81 this.routerEventsSubscription = this.createScrollEvents();
82 this.scrollEventsSubscription = this.consumeScrollEvents();
83 }
84
85 private createScrollEvents() {
86 return this.transitions.events.subscribe((e) => {

Callers

nothing calls this directly

Calls 3

createScrollEventsMethod · 0.95
consumeScrollEventsMethod · 0.95

Tested by

no test coverage detected