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

Class Dir

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

Source from the content-addressed store, hash-verified

417 const source = signal('');
418
419 @Directive({
420 selector: '[dir]',
421 })
422 class Dir {
423 tpl = inject(TemplateRef);
424 vcr = inject(ViewContainerRef);
425 cdr = inject(ChangeDetectorRef);
426 ctx = {
427 $implicit: '',
428 };
429 ref = this.vcr.createEmbeddedView(this.tpl, this.ctx);
430
431 effectRef = effect(() => {
432 if (this.ctx.$implicit !== source()) {
433 this.ctx.$implicit = source();
434 this.cdr.markForCheck();
435 }
436 });
437 }
438
439 @Component({
440 imports: [Dir],

Callers

nothing calls this directly

Calls 6

DirectiveClass · 0.90
injectFunction · 0.90
effectFunction · 0.90
sourceFunction · 0.85
markForCheckMethod · 0.80
createEmbeddedViewMethod · 0.65

Tested by

no test coverage detected