Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 49083

Reactive form doesnt works as expected

$
0
0

Hello,

Another issue, reactive form doesn’t works.

<form [formGroup]="registerForm" (ngSubmit)="register()" novalidate>
          <ion-item lines="full">
            <ion-label position="floating">Nom</ion-label>
            <ion-input type="text" required formControlName="lastname"></ion-input>
          </ion-item>
</form>


    this.registerForm = this.formBuilder.group({
      lastname: ['', Validators.required]
    });

And when i execute :

ERROR Error: Uncaught (in promise): Error: No value accessor for form control with name: 'lastname'
Error: No value accessor for form control with name: 'lastname'

Basic usage as i can see on doc or example (https://www.positronx.io/ionic-form-validation-tutorial/).

Ionic/angular : 5
Angular : 10
Ionic/Angular-toolkit : 2.3

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 49083

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>