Skip to content

Latest commit

History

History
41 lines (28 loc) 路 993 Bytes

README.md

File metadata and controls

41 lines (28 loc) 路 993 Bytes

ngx-debounce-input

A simple Angular2+ directive that adds a debounce to your input fields 馃殌

馃挕 Features

  • [鉁旓笍] Delays the start of a function call
  • [鉁旓笍] Checks whether the current input is sitting from previously entered value

馃殌 Installation

npm i @mattewn99/ngx-debounce-input

馃洜 Input Properties

Name Type Default Value Description
delay number 500 This is the time between key events before a user stops typing.

Use Example:

Add the declaration to @NgModule:

import { NgxDebounceInputModule } from '@mattewn99/ngx-debounce-input';

...

@NgModule({
  imports: [
    NgxDebounceInputModule
  ]
})

Use inside your HTML template

<input ngxDebounceInput (debounce)="search($event)" [(ngModel)]="myModel">