I'm trying to get the values of 3 inputs that are in a modal of Ionic 2 but it gives this error: Error in ./ModalPage class ModalPage - caused by: Cannot read property 'name' of undefined
My input code looks like this:
<input type="text" [(ngModel)]="model.name" name="name" placeholder="Nome">
<input type="text" [(ngModel)]="model.email" name="email" placeholder="E-mail">
<input type="text" [(ngModel)]="model.phone" name="phone" placeholder="Telefone">
I even tried to do this: [ngModel]="model?.name
but there it does not return anything.