In a FormGroup called presidentsForm I made lineItems like so:
this.presidentsForm = new FormGroup({
'lineItems': presidents
});
lineItems, my own invention, is naturally not going to be undersood by the TypeScript compiler, so while I can get away with something like this in a component template:
*ngFor="let lineItem of presidentsForm.get('lineItems').controls; let i=index"
...at the .ts file for the component itself I have to do something like this:
datum.Name = this.presidentsForm
.controls['lineItems']['controls'][counter]['controls']['name'].value;
No comments:
Post a Comment