Yeah basically. You may be able to use ElementRef.nativeElement instead of ViewChild to calculate the tree component:
Code: Select all
import { Component, OnInit, OnDestroy, AfterViewInit, ElementRef } from '@angular/core';
...
nav: HTMLSelectElement;
...
constructor(
...
private _elementRef: ElementRef ) { }
...
ngAfterViewInit() {
this.nav = this._elementRef.nativeElement.querySelector('#nav');
...
}
https://www.lucidchart.com/techblog/201 ... r-project/