我试图在我的angular应用程序中创建一个表单,但是当我想在表单上实现ngModel时:
<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>
我有这个错误:
NG8002: Can't bind to 'ngModel' since it isn't a known property of 'input'. [plugin angular-compiler]
我无法在app.config.ts中导入FormsModule,因为这个文件在Angular 17上不存在,我只有一个app.config.ts文件.
有人能告诉我怎么做吗?