Created
November 19, 2020 15:35
-
-
Save chasebaker21/b3842bc335077ab87adb6cf7ad3e087f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// sets form array data for tasks | |
initTaskInfo(tasks: TaskInfoProject[]): FormArray { | |
const taskArray = this.fb.array([]); | |
tasks.forEach(d => { | |
taskArray.push(this.fb.group({ | |
comments: new FormControl(d.comments), | |
hours: new FormControl(d.hours), | |
statusReportFlag: new FormControl(d.statusReportFlag), | |
taskCategoryId: new FormControl(d.taskCategoryId), | |
taskDesc: new FormControl(d.taskDesc), | |
taskSeq: new FormControl(d.taskSeq) | |
})) | |
}) | |
return taskArray; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment