Can not read property name

<!--
  Generated template for the LoginPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-title>login</ion-title>
  </ion-navbar>

</ion-header>


<ion-content padding>
  <form (ngSubmit)="login()" #registerForm="ngForm">
    <ion-row>
      <ion-col>
        <ion-list inset>
          <ion-item>
            <ion-input type="text" placeholder="Email" name="name" [(ngModel)]="userData.name" required></ion-input>
          </ion-item>
          <ion-item>
            <ion-input type="password" placeholder="Password" name="password" [(ngModel)]="userData.name"required></ion-input>
          </ion-item>
        </ion-list>
      </ion-col>
    </ion-row>
    <ion-row>
      <ion-col class="signup-col">
        <button ion-button class="submit-btn" full type="submit" >Login</button>
      </ion-col>
    </ion-row>
   </form>
</ion-content>

may be this cause error

name="name"

try another name for input

You have the same ngModel in email and password

i tried but throwing same error

remove name attribute

you have ngmodel attribute so you can use that variable to get value.so name attribute become meaningless