I need a buton to display an image

I am developing a mobile application With ionic 2 w I need a buton to display an image I need a button that allows to display a photo

What do you mean by need a button to display image? I did not understand your question.

That is to say when clicking on the buton the photo is displayed

Seriously what do you even mean…

That is to say when clicking on the buton the photo is displayed

<button ion-button>when clicking on the buton the photo is displayed</button>

yes , exactly !!!:!!

In your class TS : page.ts add

...
// variable
private isDisplayImage: boolean = false;
...

// function
displayImage() {
   this.isDisplayImage = true;
}
...

and in your template.html

...
<img *ngIf="isDisplayImage" src="../assets/img/image.png" />
...
<button ion-button (click)="displayImage()">Display my image</button>
...

i wish that will be helpful

thank you !
This code allows to display image but not to hide

So you want the toggle button (Display/hide),
change the code of function like below

...
// function
displayImage() {
   this.isDisplayImage = !this.isDisplayImage;
}
...

thank you yajuve !!! :slight_smile: