Guest User

Untitled

a guest
May 16th, 2019
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   ngOnInit() {
  2.       this.groupListForm = this.formBuilder.group({
  3.           groups: new FormArray([], minSelectedCheckboxes(1))
  4.       });
  5.  
  6.       this.groupService.getGroups()
  7.         .subscribe((response) => {
  8.           this.groups = response;
  9.           this.groups.forEach((item) => {
  10.               (this.groupListForm.controls.groups as FormArray).push(item);
  11.           });
  12.       });
  13.   }
Advertisement
Add Comment
Please, Sign In to add comment