0
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 is 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 it this way: [ngModel]="model?.name
but then nothing returns.
Thanks! I managed to solve here :)
– Altemberg Andrade