Answers for "form group in a form group angularin html"

2

formgroup addcontrol

let form: FormGroup = new FormGroup({});
form.addControl(field_name, new FormControl('', Validators.required));
Posted by: Guest on July-31-2020
0

formgroup angular

content_copy
      
      const form = new FormGroup({
  first: new FormControl('Nancy', Validators.minLength(2)),
  last: new FormControl('Drew'),
});

console.log(form.value);   // {first: 'Nancy', last; 'Drew'}
console.log(form.status);  // 'VALID'
Posted by: Guest on March-11-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language