Skip to content

Mattewn99/ngx-debounce-input

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

10 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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">