How to send data from one page to another in Ionic?

This is my sample code where I am moving to another page

Buttonclicked(buttonname) {
    if (buttonname == "ABC") {   
    
      this.navCtrl.push(ABCPage);
      
    }
    if (buttonname == "XYZ") {
     this.navCtrl.push(XYZPage);
    }
}

Now I want to send certain data from current page to the page where I am going. In above case I am on HomePage and want to send data to ABCPage such as buttonname. Now I want to display title of ABCPage with buttonname.
So how can we send some data to that some page and access on that page?

Buttonclicked(buttonname) {
    if (buttonname == "ABC") {   
    
      this.navCtrl.push(ABCPage, {buttonName: buttonname});
      
    }
    if (buttonname == "XYZ") {
     this.navCtrl.push(XYZPage,  {buttonName: buttonname});
    }
}

And in XYZPage / ABCPage contructor page

constructor(private navParams: NavParams) {
    let buttonName = this.navParams.get('buttonName');
  }