Loading map to ngSwitch child scope using ElementRef in Ionic
问题 I'm trying to access a ngSwitchCase view using @ViewChild and ElementRef to load a google map in my Ionic 3 app. I understand the ngSwitch creates its own scope but is it not accessible in anyway so I can load the map from google to the #map id="map" div in the mapView ngSwitchCase ? page.ts //the import import { ElementRef, ViewChild } from '@angular/core'; @Component({ selector: 'page-views', templateUrl: 'views.html' }) export class ViewsPage { //the attribute in the export class