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

Class TestCmp

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

Source from the content-addressed store, hash-verified

346
347 const source = signal('');
348 @Component({
349 template: '{{ data }}',
350 })
351 class TestCmp {
352 cdr = inject(ChangeDetectorRef);
353 data = '';
354 effectRef = effect(() => {
355 if (this.data !== source()) {
356 this.data = source();
357 this.cdr.markForCheck();
358 }
359 });
360 }
361
362 const fix = TestBed.createComponent(TestCmp);
363 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