3.0.6 • Published 6 months ago

multi-search-pipe v3.0.6

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Angular 2 / Angular 14 / Search Filter Pipe

Filter search items

Multi-criteria search in array of objects. Separate with blank space.

Angular 2 filter to make custom search.

demo-image

Install

npm i multi-search-pipe --save
yarn add multi-search-pipe

Usage

Import MultiSearchPipeModule to your module

import { NgModule } from '@angular/core';
import { BrowserModule  } from '@angular/platform-browser';
import { AppComponent } from './app';

import { MultiSearchPipeModule } from 'multi-search-pipe';

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

And use pipe in your component after declaring and initializing it in your component:

import { Component } from '@angular/core';

@Component({
  selector: 'example-app',
  template: `
    <div>
        <input type="text" [(ngModel)]="term">
        <div *ngFor = "let item of items | multiSearch:term" >
          <p>
            {{item.name}}
          </p>
        </div>

    </div>  
  `
})

export class AppComponent {
  items: string[] = [{ name: "archie" }, { name: "jake" }, { name: "richard" }];
  term = '';
}

Support multi-search-pipe

multi-search-pipe is completely free and open-source. If you find it useful, you can show your support by 🌟 it or sharing it in your social network.

Contribute

Feel free to contribute ^^

License

MIT

Donation

3.0.2

6 months ago

3.0.1

6 months ago

3.0.6

6 months ago

3.0.5

6 months ago

3.0.0

6 months ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

0.0.0

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.0.0

1 year ago