File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -105,16 +105,16 @@ <h3>FormBuilder</h3>
105105
106106@Component({ ... })
107107export class FormTestComponent implements OnInit {
108- contactForm: FormGroup;
108+ contactForm: FormGroup< ContactFormType > ;
109109
110110 constructor(private formBuilder: FormBuilder) { }
111111
112112 ngOnInit(): void {
113113 contactForm = this.formBuilder.group({
114- name: {
114+ name: this.formBuilder.group( {
115115 first: "Juana",
116116 last: "Garcia",
117- },
117+ }) ,
118118 email: "",
119119 });
120120 }
@@ -124,10 +124,10 @@ <h3>FormBuilder</h3>
124124 < h3 > Validation</ h3 >
125125 < p > ... in Model Driven forms</ p >
126126 < pre > < code class ="typescript "> this.contactForm = this.formBuilder.group({
127- name: {
127+ name: this.formBuilder.group( {
128128 first: "Juana",
129129 last: ["Garcia", Validators.required],
130- },
130+ }) ,
131131 email: ["", Validators.email],
132132 });</ code > </ pre >
133133 < ul >
You can’t perform that action at this time.
0 commit comments