Hello, I want to pass a variable in an alert like this :
const alert = this.alertCtrl.create({
title: 'Welcome' ********My variable here*************,
message: 'Do you agree to use this lightsaber to do good across the intergalactic galaxy?',
buttons: [
{
text: 'Disagree',
handler: () => {
console.log('Disagree clicked');
}
},
{
text: 'Agree',
handler: () => {
console.log('Agree clicked');
}
}
]
});
I try this with :
Welcome ${profile.firstName} ${profile.LastName} !
or
'Welcome ' + profile.firstName + ' ' + profile.lastName + ' !'
but I have trouble doing it, someone knows how to do it please ?
Thanks in advance