繁体   English   中英

html图像元素未显示图像

[英]html image element not showing image

我正在使用Ionic 2 Popover来显示图像。 但是,该图像未以modal显示。

我有以下代码。 如何获得它以显示图像?

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');
  }
}

它显示如下:

在此处输入图片说明

抱歉,是我的错。 我在错误的位置加上了“引号”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM