sgc-ui-number
v0.0.7
Published
Custom SGC number UI Components based on Angular and Material. ***
Downloads
1
Maintainers
Readme
SgcUiNumber
Custom SGC number UI Components based on Angular and Material.
Data model
TFieldFormNumberDataDefault is the default constructor for all number field component.
export const TFieldFormNumberDataDefault: TFieldFormEditData = {
...TFieldFormTextDataDefault,
showSpinner: true,
typeFieldForm: TypeFieldFormEdit.NOMBRE,
};
Number UI Component
1. Component SgcUiNumberComponent inherit BaseFieldFormEditUI
2. Selector
<sgc-ui-number></sgc-ui-number>
4. Example
//--- Declare and Init TFieldFormNumberData variable
class AppComponent implements OnInit {
mynumber1!: TFieldFormEditData;
ngOnInit() {
this.mynumber1={...TFieldFormNumberDataDefault, name:'number1', label: 'Mon champ Nombre', disabled:false, showLabel:true, showSpinner:false, showSuffixIcon:true,suffixIcon:'euro_symbol'} as TFieldFormEditData;
}
}
//------
@NgModule({
declarations: [
AppComponent,
],
imports: [
//... Import SGC-UI-NUMBER-MODULE---
SgcUiNumberModule,
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
<!-- HTML -->
<sgc-ui-number [(data)]="mynumber1"></sgc-ui-number>