sgc-ui-textarea
v0.0.7
Published
Custom SGC textarea UI Components based on Angular and Material. ***
Downloads
6
Maintainers
Readme
SgcUiTextarea
Custom SGC textarea UI Components based on Angular and Material.
Textarea UI Component
1. Component SgcUiTextareaComponent inherit BaseFieldFormEditUI
2. Selector
<sgc-ui-textarea></sgc-ui-textarea>
3. TFieldFormTextareaDataDefault TFieldFormTextareaDataDefault is the default constructor for all Textarea field component.
const TFieldFormTextareaDataDefault: TFieldFormEditData = {
...TFieldFormTextDataDefault,
rows:3,
cols:50,
typeFieldForm:TypeFieldFormEdit.TEXTE_MULTILIGNE
};
4. Example
//--- Declare and Init TSgcTextareaData variable
class AppComponent implements OnInit {
mytextarea1!: TFieldFormEditData;
ngOnInit() {
this.mytextarea1={...TFieldFormTextareaDataDefault, name:'textarea1', label: 'Mon champ Textarea', disabled:false, showLabel:true, rows:4} as TFieldFormEditData;
}
}
//------
@NgModule({
declarations: [
AppComponent,
],
imports: [
//... Import SGC-UI-TEXTAREA-MODULE---
SgcUiTextareaModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<!-- HTML -->
<sgc-ui-textarea [(data)]="mytextarea1"></sgc-ui-textarea>