Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import { Component, OnInit } from ' @angular / core ' ; import { FormArray, FormBuilder, FormGroup } from ' @angular / forms ' ;

import { Component, OnInit } from '@angular/core';
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
@Component({
selector: 'app-form',
template: `Hi! Here is an empty template. You need to fill it :) Good luck!`// put content here
})
export class FormComponent implements OnInit {
form!: FormGroup;
constructor(
private fb: FormBuilder
){
this.createForm();
}
ngOnInit(){
}
get fields(){
// implement this method
return {} as FormArray;
}
handleAddNewField(): void {
// implement this method
}
handleRemoveField(index: number){
// implement this method
}
private createForm(): void {
// implement this method
}
}

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions