@drrrs/ngx-numeric-textbox
v1.0.11
Published
An Angular numeric textbox component
Downloads
74
Maintainers
Readme
ngx-numeric-textbox
Fork of ngx-numeric-textbox upgraded to be usable with Angular 12
Installation
Install @drrrs/ngx-numeric-textbox
via:
npm install @drrrs/ngx-numeric-textbox --save
Once installed you need to import our main module in your application module:
import { NumericTextboxModule } from 'ngx-numeric-textbox';
@NgModule({
declarations: [
AppComponent,
...
],
imports: [
FormsModule,
NumericTextboxModule,
...
],
bootstrap: [
AppComponent
]
})
export class AppModule {
}
Usage
<ngx-numeric-textbox
[min]="min"
[max]="max"
[disabled]="disabled"
[decimals]="decimals"
[format]="format"
[placeholder]="placeholder"
[rangeValidation]="rangeValidation"
[(ngModel)]="value"
(focus)="onFocus()"
(blur)="onBlur()"
(enter)="onEnter()"
(escape)="onEscape()"
(ngModelChange)="ngModelChange($event)">
</ngx-numeric-textbox>
- format string: http://numeraljs.com/#format