Ionic 3上的链接位置

时间:2018-10-18 01:21:03

标签: google-maps ionic3

我需要在我的ion-fab中创建一个href,并链接到Google地图的某个位置,我想知道在ionic 3中是否可行?

这是我的home-condominios.ts

  <img [src]="property?.imagem">
    <ion-fab right top>
      <button ion-fab>
        <ion-icon name="pin"><a href="{{property.localizacao}}"></a></ion-icon>
      </button>
    </ion-fab>

这是我的condominios.ts

initializeItems(){
  this.items = [
    {id: '1', nome:'ACQUALINA', rua:'Paraguassu', cidade:'Xangri-lá', bairro:'Xangri-lá', numero:'130', localizcao: 'https://www.google.com.br/maps/place/Condom%C3%ADnio+Acqualina/@-29.8284344,-50.0542912,15z/data=!4m2!3m1!1s0x0:0xe64c7f1670c62f72?sa=X&ved=2ahUKEwiAy8rM1Y7eAhXDHpAKHYeaD20Q_BIwFHoECAsQCw' , imagem:'assets/logos/ACQUALINA.jpg'},
  ];
}

请注意,我正在定义对象数组中的位置

enter image description here

1 个答案:

答案 0 :(得分:0)

我能够解决以下问题

 <img [src]="property?.imagem">
    <ion-fab right top>
        <a href="{{property.localizacao}}" target="_system"><button ion-fab>
        <ion-icon name="pin"></ion-icon>
      </button></a>
    </ion-fab>