我认为这可能是 Reactive Form 的一个错误。我很感激更有经验的 Angular 专家的帮助。
症状:在指定时间内无法输入超过 1 个字符。
发生:当输入是 FormArray 中的 FormArray 时
我已经包含了一个 Plunker 链接,如下所示:https ://embed.plnkr.co/zl2BQe/ 。
//app.module.ts
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { ReactiveFormsModule } from '@angular/forms';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,
ReactiveFormsModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
//app.component.ts
import { Component, OnInit} from '@angular/core';
import { FormArray, FormControl, FormGroup } from '@angular/forms'; …Run Code Online (Sandbox Code Playgroud)