Change cancel button text on modal page

Hi, i can’t change the default cancel button text in modal page. Have you any method for change it? Thanks

How do you create said modal?

I created the modal like this:


let modal = this.modalCtrl.create(ModalPage);


A modal have not a “default” cancel text. Your modal header should look like that

  <ion-toolbar color="lol-orange">
    <ion-buttons start>
      <button ion-button (click)="dismiss()">
        <span ion-text showWhen="ios" style="color: white">Close</span>
        <ion-icon name="md-close" showWhen="android,windows"></ion-icon>

And in your .ts file

  dismiss() {
1 Like

Thanks, I did not think to look at the modal html page … Sorry for the inconvenience and thanks again

1 Like