| 375 | |
| 376 | it('should run content queries defined on directives', () => { |
| 377 | @Directive({ |
| 378 | selector: '[query]', |
| 379 | host: {'[textContent]': `noOfEls()`}, |
| 380 | }) |
| 381 | class QueryDir { |
| 382 | elements = contentChildren('el'); |
| 383 | element = contentChild('el'); |
| 384 | elementReq = contentChild.required('el'); |
| 385 | |
| 386 | noOfEls = computed( |
| 387 | () => |
| 388 | this.elements().length + |
| 389 | (this.element() !== undefined ? 1 : 0) + |
| 390 | (this.elementReq() !== undefined ? 1 : 0), |
| 391 | ); |
| 392 | } |
| 393 | |
| 394 | @Component({ |
| 395 | imports: [QueryDir], |
nothing calls this directly
no test coverage detected