TypeError: jit_nodeValue_17(...) is not a function

Viewed 1043

The main purpose here was to register the user, at first it was working fine, but now that I have made some changes, after entering the email and the password when clicking the button it presents this error: see the error here enter image description here


auth.service:

utilizadorCadastrar(value) {
return new Promise<any> ((resolve, reject) => {
  return this.afAuth.auth.createUserWithEmailAndPassword(value.email, value.senha)
  .then(res => {
    resolve(res);
  }, err  => reject(err));
});

}


cliente-cadastrar.component.ts:

export class ClienteRegistrarComponent implements OnInit {

formCadastro: FormGroup;

{...}

ngOnInit() {
   this.iniciarForm();
}

public cadastrar(value) {
   this.auth.utilizadorCadastrar(value)
    .then(res => {
        console.log(res);
    }, err => {
         console.log(err);
    });  }
    { ... }

cliente-registrar.component.html

The error is coming from here on the button (click) "event"

 <form class="form-normal" [formGroup]="formCadastro">
<div class="entrar-container">
  <h1 matDialogTitle>Cadastrar-se</h1>
  <mat-dialog-content class="entrar-container">
    <mat-form-field class="input-full-width" color="warn">
      <input type="email" matInput id="email" placeholder="Email" name="email" formControlName="email">
      <mat-error *ngIf="errosForm.email">
        {{errosForm.email}}
      </mat-error>
    </mat-form-field>
    <mat-form-field class="input-full-width" color="warn">
      <input type="password" matInput id="senha" placeholder="Senha" name="senha" formControlName="senha" [type]="hide ? 'password' : 'text'">
      <mat-icon matSuffix (click)="hide = !hide">{{hide ? 'visibility_off' : 'visibility'}}</mat-icon>
      <mat-error *ngIf="errosForm.senha">
        {{errosForm.senha}}  
      </mat-error>
    </mat-form-field>
  </mat-dialog-content>
  <mat-dialog-actions align="end">
    <button type="submit" mat-raised-button color="warn" [disabled]="!formCadastro.valid" (click)="cadastrar(formCadastro.value)">Cadastrar-se</button>
  </mat-dialog-actions>
</div>
1 Answers

I received the same error today when my button click had the same name as another element on my form. When I renamed it, the error disappeared.

Related