首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ion 2- <ion-segment> <div>谷歌地图未显示

ion 2- <ion-segment> <div>谷歌地图未显示
EN

Stack Overflow用户
提问于 2017-06-13 15:49:59
回答 0查看 842关注 0票数 2

加载页面时,将显示google地图。但是,当离子段被切换时,贴图不会显示。下面是我的ionic 2代码:

代码语言:javascript
复制
<ion-header>
  <ion-toolbar no-border-top>
    <ion-segment [(ngModel)]="social" (ionChange)="segementChangeAction()">
      <ion-segment-button value="activity">
        Map
      </ion-segment-button>
      <ion-segment-button value="messages">
        Messages
      </ion-segment-button>
    </ion-segment>
  </ion-toolbar>
</ion-header>



<ion-content no-bounce>
  <div [ngSwitch]="social">
    <div *ngSwitchCase="'activity'">
        <div #map id="map"></div>
    </div>
    <div *ngSwitchCase="'messages'">
      Some text.....        
    </div>
  </div>
</ion-content>
EN

回答

页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/44515369

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档