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

Class AppComponent

packages/core/test/acceptance/authoring/signal_queries_spec.ts:32–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30 describe('view', () => {
31 it('should query for an optional element in a template', () => {
32 @Component({
33 template: `<div #el></div>`,
34 })
35 class AppComponent {
36 divEl = viewChild<ElementRef<HTMLDivElement>>('el');
37 foundEl = computed(() => this.divEl() != null);
38 }
39
40 const fixture = TestBed.createComponent(AppComponent);
41 // with signal based queries we _do_ have query results after the creation mode

Callers

nothing calls this directly

Calls 4

ComponentInterface · 0.90
computedFunction · 0.90
viewChildrenFunction · 0.90
requiredMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…