Passing variables with ion-back-button

How can I pass a variable to the previous component on click of the back button?

Many ways exist. You could attach a listener on back button keypress and send parameters to the target page using NavParams or you can store in ionic storage and retrieve them in the other page.