| 412 | const source = signal(''); |
| 413 | |
| 414 | @Directive({ |
| 415 | selector: '[dir]', |
| 416 | }) |
| 417 | class Dir { |
| 418 | tpl = inject(TemplateRef); |
| 419 | vcr = inject(ViewContainerRef); |
| 420 | cdr = inject(ChangeDetectorRef); |
| 421 | ctx = { |
| 422 | $implicit: '', |
| 423 | }; |
| 424 | ref = this.vcr.createEmbeddedView(this.tpl, this.ctx); |
| 425 | |
| 426 | effectRef = effect(() => { |
| 427 | if (this.ctx.$implicit !== source()) { |
| 428 | this.ctx.$implicit = source(); |
| 429 | this.cdr.markForCheck(); |
| 430 | } |
| 431 | }); |
| 432 | } |
| 433 | |
| 434 | @Component({ |
| 435 | imports: [Dir], |
nothing calls this directly
no test coverage detected