()
| 277 | } |
| 278 | |
| 279 | ngOnDestroy() { |
| 280 | this._nodeOutlet.viewContainer.clear(); |
| 281 | |
| 282 | this._nodes.complete(); |
| 283 | this._keyManagerNodes.complete(); |
| 284 | this._nodeType.complete(); |
| 285 | this._flattenedNodes.complete(); |
| 286 | this.viewChange.complete(); |
| 287 | this._onDestroy.next(); |
| 288 | this._onDestroy.complete(); |
| 289 | |
| 290 | if (this._dataSource && typeof (this._dataSource as DataSource<T>).disconnect === 'function') { |
| 291 | (this.dataSource as DataSource<T>).disconnect(this); |
| 292 | } |
| 293 | |
| 294 | this._dataSubscription?.unsubscribe(); |
| 295 | this._dataSubscription = undefined; |
| 296 | |
| 297 | // In certain tests, the tree might be destroyed before this is initialized |
| 298 | // in `ngAfterContentInit`. |
| 299 | this._keyManager?.destroy(); |
| 300 | } |
| 301 | |
| 302 | ngOnInit() { |
| 303 | this._checkTreeControlUsage(); |
nothing calls this directly
no test coverage detected