Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// 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