Hi,
I am looking for a way to create a variable that I can access from a different pages. I want to create it at one page and use it as button-caption on another page.
This is the first page. In this .ts I want to create the variable:
export class SettingsPage {
constructor(public navCtrl: NavController, public navParams: NavParams) {}
getValues(){
var goal:number = 5;
}
}
And this is the second page where I want to use it as label (.html):
<ion-content>
<button ion-button large >variable {{goal}}</button>
</ion-content>
If you have any suggestions how to do this, in the best case with some code, I would be very thankfully.
Greetings,
Robert