Number keyboard for mobile browsers For Angular
npm install ng-numeric-keyboardNumber keyboard for mobile browsers For Angular
> This project was forked in numeric-keyboard
```
npm install ng-numeric-keyboard --save
import NgNumericKeyboardModule。
`typescript
import { NgNumericKeyboardModule } from 'ng-numeric-keyboard';
@NgModule({
imports: [ BrowserModule, NgNumericKeyboardModule ],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule { }
`
`html
[placeholder]="'This is placeholder'"
[disabled]="false"
[(ngModel)]="data"
(enterpress)="onEnter()"
(ngModelChange)="onChange()"
(focus)="onInputFocus()"
(blur)="onInputBlur()">
`
Frequently used API is below. See the link for more information
| string | number | keyboard layout. Possible layouts are number, tel and phone |
| entertext | string | Enter | the label of keyboard enter key |
| placeholder | string | | the input component's placeholder |
| disabled | boolean | false | disable the input component |$3
| Name | Type | Description |
| ----------------------- | ----------------- | ----------- |
| ngModelChange() | number | Emits when the enter key of keyboard is pressed |
| enterpress() | void | Emits when the input's value changes |
| focus() | void | Emits when called on focusing |
| blur() | void | Emits when the input loses the focus |$3
There are three built-in layouts called
number, tel and phone` which can be used as a replacement of system keyboard. ##### number layout
!number layout
##### tel layout
!tel layout
##### phone layout
!phone layout
Please follow this guidelines when reporting bugs and feature requests:
1. Use GitHub Issues board to report bugs and feature requests (not our email address)
2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.
Thanks for understanding!
The MIT License (see the LICENSE file for the full text)