| 87 | }); |
| 88 | |
| 89 | @Component({ |
| 90 | selector: 'testCollection', |
| 91 | template: '<ng-content />', |
| 92 | }) |
| 93 | class TestCollectionComponent implements HasElement, OnDestroy { |
| 94 | readonly _collection = new SortedCollection<TestItemComponent>(); |
| 95 | readonly element = inject(ElementRef).nativeElement as HTMLElement; |
| 96 | |
| 97 | constructor() { |
| 98 | afterNextRender(() => { |
| 99 | this._collection.startObserving(this.element); |
| 100 | }); |
| 101 | } |
| 102 | |
| 103 | ngOnDestroy() { |
| 104 | this._collection.stopObserving(); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | @Component({ |
| 109 | selector: 'testItem', |
nothing calls this directly
no outgoing calls
no test coverage detected