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

Method constructor

adev/src/app/features/tutorial/tutorial.component.ts:103–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

101 readonly answerRevealed = signal<boolean>(false);
102
103 constructor() {
104 this.route.data
105 .pipe(
106 filter(() =>
107 Boolean(this.route?.routeConfig?.path?.startsWith(`${PAGE_PREFIX.TUTORIALS}/`)),
108 ),
109 takeUntilDestroyed(),
110 )
111 .subscribe((data) => {
112 const docContent = (data['docContent'] as DocContent | undefined)?.contents ?? null;
113 this.documentContent.set(docContent);
114 this.setTutorialData(data as TutorialNavigationItem);
115 });
116
117 const destroyRef = inject(DestroyRef);
118 afterNextRender(() => {
119 this.splitResizerHandler.init(
120 this.elementRef,
121 this.content()!,
122 this.resizer(),
123 this.editor(),
124 );
125
126 from(this.loadEmbeddedEditorComponent())
127 .pipe(takeUntilDestroyed(destroyRef))
128 .subscribe((editorComponent) => {
129 this.embeddedEditorComponent.set(editorComponent);
130 });
131 });
132 }
133
134 toggleNavigationDropdown($event: MouseEvent): void {
135 // Stop propagation required to avoid detecting click inside ClickOutside

Callers

nothing calls this directly

Calls 9

setTutorialDataMethod · 0.95
takeUntilDestroyedFunction · 0.90
injectFunction · 0.90
afterNextRenderFunction · 0.90
contentMethod · 0.80
subscribeMethod · 0.65
setMethod · 0.65
initMethod · 0.65

Tested by

no test coverage detected