I'm VERY new to Ionic/Angular/Typescript...
I have the following button:
<button ion-button (click)="shareMe('hello')">Hello</button>
<button ion-button (click)="shareMe('world')">World</button>
And I have the following function:
shareMe(){
this.sharingVar.share($STRING)
.then(()=>{
alert("Success");
},
()=>{
alert("failed");
})
};
Basically, when I click a given button, I want to pass a VARIABLE to the function to process. The code above obviously doesn't work... but how do you do this in Angular/Typescript?
Is there a way to pass a variable $string to a function?
Please be as descriptive as you can. Much thanks.