1.1.0 • Published 7 years ago

ng-allow-input-key v1.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ng-allow-input-key

  1. Description
  2. Installation
  3. Usage
  4. Git repository
  5. Version
  6. License

1. Description

allowInputKey is a directive for angular 2+ allows input by your pattern.

2. Installation

To install this library, run:

$ npm install ng-allow-input-key --save

3. Usage

Once you have published your library to npm, you can import your library in any Angular application by running:

$ npm install ng-allow-input-key

and then from your Angular AppModule:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { AppComponent } from './app.component';
 
import { NgAllowInputKeyModule } from "ng-allow-input-key"; // <--- 1. Import library
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgAllowInputKeyModule // <--- 2. Add library to imports
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use allowInputKey directive in your Angular application:

<input type="text" [allowInputKey]="pattern"> 

and add pattern to component:

pattern: RegExp = /[a-z0-9]/;

4. Git repository

https://github.com/ZhyravlevAS/ng-allow-input-key

5. Version

1.1.0

6. License

MIT © Anton Zhyravlev

1.1.0

7 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago