New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

ngx-splitinput

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-splitinput

Angular split input library, that enables you to build awesome OTP verification forms.

latest
Source
npmnpm
Version
0.7.3
Version published
Maintainers
1
Created
Source

Ngx-SplitInput

Usage

  • Install library:

    npm install --save ngx-splitinput

  • Import the NgxSplitInputModule into your Angular module:

    import {NgxSplitInputModule} from 'ngx-splitinput';
    
    @NgModule({
      imports: [
        NgxSplitInputModule,
        ...
      ],
      ...
    })
    export class AppModule { }
    
  • Use the NgxSplitInputComponent in you template as follows:

    <ngx-split-input>
        <input ngxSplitInput type="text" maxlength="1">
        <input ngxSplitInput type="text" maxlength="1">
        <input ngxSplitInput type="text" maxlength="1">
        <input ngxSplitInput type="text" maxlength="1">
    </ngx-split-input>
    

Currently only input elements of type 'text', 'number' and 'password' are supported. The ngxSplitInput directive has to be places on every input element contained in the SplitInput component. The 'type' and 'maxlength' arguments are required for every input.

For an example implementation see the code of the Sample App.

Options

This section describes the inputs of the component. All inputs are optional.

Inputs

  • autofocus: boolean = true: If set to true the first input element will be focused on page load.
  • clipboard: boolean = true: If set to true autofill for textual content from clipboard is enabled.

Outputs

  • completed: any: Is emitted when the SplitInput fields are filled out completely and contains the concatenated value of the SplitInput fields.

Keywords

ng

FAQs

Package last updated on 10 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts