-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Labels
type: bug/fixThis is a bug or at least needs a fixThis is a bug or at least needs a fixworkaround-1: obviousObvious workaroundObvious workaround
Description
is it possible to remove this alert, i followed the whole manual to create the FormGroup
public form:NgxSubForm<Endereco, Endereco> help on to find out the name of the variables in [formControlName]="form.formControlNames.city"
<div class="row gy-1 gx-2" [formGroup]="form.formGroup">
<div class="col-md-6">
<app-input-text label="Email" [formControlName]="form.formControlNames.city"></app-input-text>
</div>
</div>
import {Component, forwardRef, OnInit} from '@angular/core';
import {createForm, FormType, NgxSubForm, subformComponentProviders} from 'ngx-sub-form';
import {FormControl, FormGroup, Validators} from '@angular/forms';
export interface Endereco {
street: string;
city: string;
state: string;
zipCode: string;
}
@Component({
selector: 'app-endereco-form',
templateUrl: './endereco.form.html',
styleUrls: ['./endereco.form.scss'],
providers: subformComponentProviders( forwardRef(() => EnderecoForm) ),
})
export class EnderecoForm implements OnInit {
public form:NgxSubForm<Endereco, Endereco> = createForm<Endereco>(this, {
formType: FormType.SUB,
formControls: {
street: new FormControl(null, Validators.required),
city: new FormControl(null, Validators.required),
state: new FormControl(null, Validators.required),
zipCode: new FormControl(null, Validators.required),
},
});
constructor() {
}
ngOnInit(): void {
}
}
i23591326
Metadata
Metadata
Assignees
Labels
type: bug/fixThis is a bug or at least needs a fixThis is a bug or at least needs a fixworkaround-1: obviousObvious workaroundObvious workaround