| 2992 | } |
| 2993 | |
| 2994 | @Component({ |
| 2995 | selector: 'div-query', |
| 2996 | template: '<ng-container #vc></ng-container>', |
| 2997 | standalone: false, |
| 2998 | |
| 2999 | changeDetection: ChangeDetectionStrategy.Eager, |
| 3000 | }) |
| 3001 | class DivQuery { |
| 3002 | @ContentChild(TemplateRef, {static: true}) template!: TemplateRef<any>; |
| 3003 | |
| 3004 | @ViewChild('vc', {read: ViewContainerRef, static: true}) vc!: ViewContainerRef; |
| 3005 | |
| 3006 | @ContentChildren(TextDirective, {descendants: true}) query!: QueryList<TextDirective>; |
| 3007 | |
| 3008 | create() { |
| 3009 | this.vc.createEmbeddedView(this.template); |
| 3010 | } |
| 3011 | |
| 3012 | destroy() { |
| 3013 | this.vc.clear(); |
| 3014 | } |
| 3015 | } |
| 3016 | |
| 3017 | TestBed.configureTestingModule({declarations: [TextDirective, DivQuery]}); |
| 3018 | loadTranslations({ |
nothing calls this directly
no test coverage detected
searching dependent graphs…