📜  formgroup angular - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:38.900000             🧑  作者: Mango

代码示例3
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'