2016-09-29 160 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

对不起,我错了。我在错误的地方有“引号”标记。