| 324 | |
| 325 | it('should run content queries defined on directives', () => { |
| 326 | @Directive({ |
| 327 | selector: '[query]', |
| 328 | host: {'[textContent]': `noOfEls()`}, |
| 329 | }) |
| 330 | class QueryDir { |
| 331 | elements = contentChildren('el'); |
| 332 | element = contentChild('el'); |
| 333 | elementReq = contentChild.required('el'); |
| 334 | |
| 335 | noOfEls = computed( |
| 336 | () => |
| 337 | this.elements().length + |
| 338 | (this.element() !== undefined ? 1 : 0) + |
| 339 | (this.elementReq() !== undefined ? 1 : 0), |
| 340 | ); |
| 341 | } |
| 342 | |
| 343 | @Component({ |
| 344 | imports: [QueryDir], |
nothing calls this directly
no test coverage detected
searching dependent graphs…