| 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], |
nothing calls this directly
no test coverage detected