* Insert a new `AbstractControl` at the given `index` in the array. * * @param index Index in the array to insert the control. If `index` is negative, wraps around * from the back. If `index` is greatly negative (less than `-length`), prepends to the array. * This behavior is the sam
(index: number, control: TControl, options: {emitEvent?: boolean} = {})
| 211 | * NOTE: Inserting to the FormArray will not mark it dirty. If you want to mark if dirty, call `markAsDirty()`. |
| 212 | */ |
| 213 | insert(index: number, control: TControl, options: {emitEvent?: boolean} = {}): void { |
| 214 | this.controls.splice(index, 0, control); |
| 215 | |
| 216 | this._registerControl(control); |
| 217 | this.updateValueAndValidity({emitEvent: options.emitEvent}); |
| 218 | } |
| 219 | |
| 220 | /** |
| 221 | * Remove the control at the given `index` in the array. |
no test coverage detected