0

I am using a Ionic 2 popover, to display an image. However, the image is not displaying in the modal.

I have the following code. How do I get it to display the image?

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

And it displays this:

enter image description here

1 Answer 1

1

Sorry, my mistake. I had "quotation" marks in the wrong place.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.