Angular 页面ngIf中的同一组件两次未按预期工作 <div id="{{gMapConfig.id}}" class="g-map"></div> <loader *ngIf="!googleReady||plottingData"&
页面ngIf中的同一组件两次未按预期工作Angular 页面ngIf中的同一组件两次未按预期工作 <div id="{{gMapConfig.id}}" class="g-map"></div> <loader *ngIf="!googleReady||plottingData"&,angular,google-maps,Angular,Google Maps,页面ngIf中的同一组件两次未按预期工作 <div id="{{gMapConfig.id}}" class="g-map"></div> <loader *ngIf="!googleReady||plottingData"></loader> window['onMapsLoaded'] = (ev) => { this.googleReady = true; } plotMarkers() { this.plottingData =
<div id="{{gMapConfig.id}}" class="g-map"></div>
<loader *ngIf="!googleReady||plottingData"></loader>
window['onMapsLoaded'] = (ev) => {
this.googleReady = true;
}
plotMarkers() {
this.plottingData = true;
....
//after plotting markers
this.plottingData = false;
}