2016-09-29 101 views
0

我正在使用Ionic 2 popover顯示圖像。但是,圖像不顯示在modal中。html圖像元素未顯示圖像

我有以下代碼。我如何讓它顯示圖像?

import { Component } from '@angular/core'; 
import { NavParams } from 'ionic-angular'; 

@Component({ 
    template: ` 
    <ion-content padding id="image-popover"> 
     <ion-list> 
     <ion-row> 
      <ion-col> 
      <center> 
       <img class="item-stable" src="{{image}} height="75" width="75""/> 
       <p>{{text}}</p> 
      </center> 
      </ion-col> 
     </ion-row> 
     </ion-list> 
    </ion-content> 
    ` 
}) 
export class ImagePopOverPage { 
    private image: string = null; 
    private text: string = null; 

    constructor(private navParams: NavParams) { 
    this.image = navParams.get('image'); 
    this.text = navParams.get('text'); 
    } 
} 

並顯示如下:

enter image description here

回答

1

對不起,我錯了。我在錯誤的地方有「引號」標記。