如何在app.module中添加formbulder
模块 AppModule 导入了意外值 FormBuilder。请添加@NgModule注释。
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { HttpClientModule, HTTP_INTERCEPTORS } from "@angular/common/http";
import {FormBuilder, FormControl, FormGroup, Validators, FormsModule} from '@angular/forms';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ClientComponent } from './client/client.component';
import { ClientTaskComponent } from './clienttask/clienttask.component';
import { ClientService } from './client/sherad/client.service';
@NgModule({
declarations: [
AppComponent, ClientComponent, ClientTaskComponent, ClientService
],
imports: [
BrowserModule,
AppRoutingModule,
HttpClientModule,
FormsModule,
FormBuilder,
FormGroup,
FormControl
], …Run Code Online (Sandbox Code Playgroud) javascript single-page-application typescript ecmascript-6 angular