1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Why ngModel doesn't works on the last version of Angular 17?

Discussão em 'Angular' iniciado por Makil Uspn, Outubro 5, 2024 às 10:32.

  1. Makil Uspn

    Makil Uspn Guest

    I am trying to make a form in my angular app, but when i want to implement ngModel on my form :

    <form (ngSubmit)="onSignUp()" #signupForm="ngForm">
    <h1>Connexion</h1>
    <input type="email" name="mail" [(ngModel)]="userLogin.email" placeholder="Email" />
    <input type="password" name="mdp" [(ngModel)]="userLogin.password" placeholder="Password" />
    <a href="#">Mot de passe oublie ?</a>
    <button type="submit">Se Connecter</button>
    </form>


    I have this error :

    NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'. [plugin angular-compiler]

    I can't import FormsModule in the app.module.ts because this file doesn't exists on Angular 17, i only have an app.config.ts file.

    Can someone please explain me how to do?

    Continue reading...

Compartilhe esta Página