М
Size: a a a
М
М
SA

AB
AB
М
SA
VS
SA
VS
constructor(private fb: FormBuilder) {
this.onSelectProject();
}
onSelectProject() {
this.getOne().subscribe(project => {
console.log(project.attributes);
const attributesGroups = project.attributes.map(attribute => ({
name: [attribute.name, []],
value: [attribute.val, []]
}));
this.form = this.fb.group({
name: [project.name, []],
descr: [project.descr, []],
attributes: [this.fb.array(attributesGroups), []]
});
console.log(this.form);
});
}VS
VS
М
constructor(private fb: FormBuilder) {
this.onSelectProject();
}
onSelectProject() {
this.getOne().subscribe(project => {
console.log(project.attributes);
const attributesGroups = project.attributes.map(attribute => ({
name: [attribute.name, []],
value: [attribute.val, []]
}));
this.form = this.fb.group({
name: [project.name, []],
descr: [project.descr, []],
attributes: [this.fb.array(attributesGroups), []]
});
console.log(this.form);
});
}М
VS
VS
М
М
М
М