诸如ng-dirty, ngvalid
之类的元素未在我的Angular项目中生成,
我要附加下面使用的图像和代码。
app.module.ts并在此处输入html
app.module.ts
import { FormsModule,ReactiveFormsModule } from '@angular/forms';
imports: [
FormsModule,
ReactiveFormsModule,]
......
Login.html
<form (ngSubmit)="onSubmit()" #demoForm="ngForm">
<div class="clearfix simple-bar">
<div class="bar-1"></div>
<div class="bar-2"></div>
</div>
<div class="login-inputs">
<div class="username-block">
<div class="icon-block">
<i class="material-icons">
email
</i>
</div>
<input type="text" [(ngModel)]="hero.name" #name="ngModel" name="test" placeholder="Username">
</div>
........
可能是什么问题?