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

Class TestCmp

packages/core/test/render3/reactivity_spec.ts:351–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349
350 const source = signal('');
351 @Component({
352 changeDetection: ChangeDetectionStrategy.OnPush,
353 template: '{{ data }}',
354 })
355 class TestCmp {
356 cdr = inject(ChangeDetectorRef);
357 data = '';
358 effectRef = effect(() => {
359 if (this.data !== source()) {
360 this.data = source();
361 this.cdr.markForCheck();
362 }
363 });
364 }
365
366 const fix = TestBed.createComponent(TestCmp);
367 await fix.whenStable();

Callers

nothing calls this directly

Calls 8

ComponentInterface · 0.90
injectFunction · 0.90
effectFunction · 0.90
signalFunction · 0.90
InputInterface · 0.90
sourceFunction · 0.85
markForCheckMethod · 0.80
createMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…