UNPKG

ngx-numaric-keypad

Version:

This is a two in one features keypad, you can use this as calculator also by just enabling that feature.

58 lines (42 loc) 1.19 kB
# ngx-number-keypad This is a two in one features keypad, you can use this as calculator also by just enabling that feature. # Angular9+ ## Get started npm i ngx-number-keypad --save ## Techniques import in your app.module.ts file ``` ... import { KeypadModule } from 'ngx-numaric-keypad'; ... @NgModule({ declarations: [ ... ], imports: [ ... KeypadModule, ... ], providers: [], bootstrap: [AppComponent] }) export class AppModule { } ``` then put below component in your view, and if you want to use calculator then make that **calc = true** otherwise you can remove that param or make it **calc = false**. ``` <ngx-numaric-keypad [calc]="true" (getVal)="yourFunctionName($event)" > </ngx-numaric-keypad> ``` Now create function in your component.ts file ``` yourFunctionName(numberOutput: number) { console.log(numberOutput) // you will have your keypad output here } ``` ![Keypad Image](https://github.com/sumitLKpatel/ngx-number-keypad/blob/master/projects/upload/keypad-min-new.png?raw=true) ## License MIT © [Sumit Patel](https://github.com/sumitLKpatel)