| 96 | } |
| 97 | |
| 98 | @Component({ |
| 99 | selector: 'testItem', |
| 100 | template: ` |
| 101 | <div>{{value}}</div> |
| 102 | `, |
| 103 | }) |
| 104 | class TestItemComponent implements HasElement, OnDestroy { |
| 105 | readonly element = inject(ElementRef).nativeElement as HTMLElement; |
| 106 | private readonly _parent = inject(TestCollectionComponent); |
| 107 | |
| 108 | @Input() value!: string; |
| 109 | |
| 110 | constructor() { |
| 111 | afterNextRender(() => { |
| 112 | this._parent._collection.register(this); |
| 113 | }); |
| 114 | } |
| 115 | |
| 116 | ngOnDestroy() { |
| 117 | this._parent._collection.unregister(this); |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | @Component({ |
| 122 | template: ` |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…