Posts by marcelo campos • 46 points
3 posts
-
1
votes1
answer363
viewsA: Cannot read Property 'hasError' of Undefined when trying to put Validator required
this error occurs because the sku object is not of the Formcontrol type. You can try to access the sku object: variacaForm.controls.variacoes.Controls[i].controls.sku.hasError('required')
-
2
votes2
answers5245
viewsA: Form Builder with angular array
public formulario; public ngOnInit() { this.formulario = new FormGroup({ data: new FormControl(), nome: new FormControl(), tipos: new FormBuilder().array([ new…
angularanswered marcelo campos 46 -
0
votes2
answers475
viewsA: Form group does not update angular template
there is a function that assigns values of an object in the form provided that the object has the same attributes as the form: this.produtoForm.patchValue(produto);
angularanswered marcelo campos 46