sgc-ui-number
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

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>

Package Sidebar

Install

npm i sgc-ui-number

Weekly Downloads

1

Version

0.0.7

License

none

Unpacked Size

39.2 kB

Total Files

16

Last publish

Collaborators

  • csaadong