Hi, sorry my english, but I’m in Ionic, I’m studying in college, and I have to create an app with a button with this message: ‘Insert your informations’, and after that must have a cancel and a send button, and when click in send, the information that you insert should have appear in a new page. But I’m trying to do that but not succes.
tab2.page.html```
<ion-header [translucent]=“true”>
Cadastro
<ion-content [fullscreen]=“true”>
<ion-button (click)=“showAlert()”
expand=“block”
shape=“round”
class=“my-action-button”>
Informe seus dados
tab2.page.ts
export class Tab2Page {
constructor(private alertCtrl: AlertController) {
}
async showAlert(){
let alert = await this.alertCtrl.create({
header: 'Cadastro',
inputs: [
{
name: 'email',
placeholder: 'Email'
},
{
name: 'telefone',
placeholder: 'Telefone',
}
],
buttons: [
{
text: 'Cancel',
role: 'cancel',
handler: data => {
console.log('Cancel clicked');
}
},
{
text: 'Enviar',
role: 'enviar',
handler: data => {
console.log('Enviar clicked');
}
}
]
});
alert.present();
}
}
[buttoninformation|690x387](upload://pYO3ulwBd5hwg8ZkZ9ifvO7gs5X.png) ![input|690x387](upload://AbiQJFZ4X5Y37PQoRM2wmFOUeH6.png)