0.0.7 • Published 5 months ago
sgc-ng-field-form-edit v0.0.7
SgcNgFieldFormEdit
Custom SGC fieldFormEdit UI Components based on Angular and Material. This component automatically generate SGC Component based on TypeFieldFormEdit
Component
SgcNgFieldFormEditComponent
@Component({
selector: 'sgc-ng-field-form-edit',
templateUrl: `./sgc-ng-field-form-edit.component.html`,
styleUrls: [`./sgc-ng-field-form-edit.component.scss`],
})
class SgcNgFieldFormEditComponent implements OnInit {
@Input() fieldForm!: TFieldFormEditData;
@Output() fieldFormChange: EventEmitter<TFieldFormEditData> = new EventEmitter<TFieldFormEditData>();
@Input() fieldSubmitted?: boolean = false;
//-----------------
}
Propriété | Type données | Description |
---|---|---|
fieldForm | TFieldFormEditData | Objet décrivant le champ/composant graphique à utiliser dans le formulaire |
Selector
<sgc-ng-field-form-edit></sgc-ng-field-form-edit>
Example
//--- Declare and Init TFieldFormPasswordData variable
class AppComponent implements OnInit {
mysecret1!: TFieldFormEditData;
ngOnInit() {
this.mysecret1={...TFieldFormPasswordDataDefault, name:'password1', label: 'Mon champ Password 1', disabled:false, showLabel:true, hidePassword:true};
}
<!-- HTML -->
<sgc-ng-field-form-edit [(fieldForm)]="mysecret1"></sgc-ng-field-form-edit>