’
the character escape for new lines in the code is not working and the label for the input got lost somewhere… Also the popup dismisses when the handler is empty
let alert = this.alertCtrl.create({
header: trip.name,
subHeader: "Enter the number of slots\r\nPricing for the slots is " + trip.price + "\r\n" +
"Slots remaining " + trip.slots + "\r\n"+ "Bookable slots " + (trip.slots*.1),
inputs: [
{
label: 'Slots',
name: 'Slots',
placeholder: 'Slots',
type: 'number',
value: this.tripvalues,
max: Math.trunc((trip.slots*.1)),
min: 1
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Login',
handler: data => {
}
}
]
});
(await alert).present();
}
Also how do I implement something like this??
1 post - 1 participant