Skip to content

Instantly share code, notes, and snippets.

@Tanver-Hasan
Created July 29, 2018 10:52
Show Gist options
  • Save Tanver-Hasan/cb5c5636eae2b936b65a50f5219e95e2 to your computer and use it in GitHub Desktop.
Save Tanver-Hasan/cb5c5636eae2b936b65a50f5219e95e2 to your computer and use it in GitHub Desktop.
this.data.getCustomer().subscribe(res => {
console.log(res[0]);
this.customerForm.patchValue({
firstName: res[0].firstName,
lastName: res[0].lastName
});
for (let index = 0; index < res[0].mobile.length; index++) {
this.mobiles.controls.push(this.buildNumber());
this.mobiles.at(index).patchValue({
number: res[0].mobile[index].number,
});
}
this.mobiles.controls.pop();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment