GithubHelp home page GithubHelp logo

dzcorps / ng-numeric-keyboard Goto Github PK

View Code? Open in Web Editor NEW

This project forked from m310851010/ng-numeric-keyboard

0.0 0.0 0.0 1.02 MB

Number keyboard for mobile browsers For Angular

Home Page: https://m310851010.github.io/ng-numeric-keyboard

License: MIT License

JavaScript 5.14% TypeScript 69.58% HTML 12.87% SCSS 12.41%

ng-numeric-keyboard's Introduction

ng-numeric-keyboard

Number keyboard for mobile browsers For Angular

This project was forked in numeric-keyboard

Demo

Online Demo

Alt Text

Usage

1. Install

npm install @xmagic/ng-numeric-keyboard --save

import NgNumericKeyboardModuleใ€‚

import { NgNumericKeyboardModule } from '@xmagic/ng-numeric-keyboard';

@NgModule({
  imports: [ BrowserModule, NgNumericKeyboardModule ],
  declarations: [AppComponent],
  bootstrap: [AppComponent]
})
export class AppModule { }

2. Template

<ng-numeric-input layout="number"
                  entertext="Next"
                  placeholder="This is placeholder"
                  [disabled]="false"
                  [(ngModel)]="data"
                  (enterpress)="onEnter()"
                  (ngModelChange)="onChange()"
                  (focus)="onInputFocus()"
                  (blur)="onInputBlur()">
</ng-numeric-input>

API

Frequently used API is below. See the link for more information

Inputs

Name Type Default Description
layout 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

Outputs

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

Layouts

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

Troubleshooting

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!

License

The MIT License (see the LICENSE file for the full text)

ng-numeric-keyboard's People

Contributors

m310851010 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.