@ViewChild('container', { static: true }) container: ElementRef;
ngAfterContentInit() {
try {
this.mapLoaded = this.mapLibrary.ready;
} catch (e) {
console.error(e);
}
}
TypeError: Cannot read property 'nativeElement' of undefined
<app-map-wrapper>
<div id="map" #container></div>
</app-map-wrapper>