0.5.1 • Published 6 years ago
ng2-search-filter v0.5.1
Angular 2 / Angular 4 / Angular 5 Search Filter Pipe
Filter search items
Angular 2 filter to make custom search. Works with Angular 4 and Angular 5 too.
Install
npm i ng2-search-filter --save
yarn add ng2-search-filter
Usage
In case you're using systemjs
- see configuration here.
Import Ng2SearchPipeModule
to your module
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { AppComponent } from './app';
import { Ng2SearchPipeModule } from 'ng2-search-filter';
@NgModule({
imports: [BrowserModule, Ng2SearchPipeModule],
declarations: [AppComponent],
bootstrap: [AppComponent]
})
export class AppModule {}
And use pipe 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 |filter:term" >
<p>
{{item.name}}
</p>
</div>
</div>
`
})
export class AppComponent {
items: string[] = [{ name: "archie" }, { name: "jake" }, { name: "richard" }];
}
Support ng2-search-filter
ng2-search-filter 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
Please do 🙂
License
0.5.1
6 years ago
0.5.0
6 years ago
0.4.9
6 years ago
0.4.8
6 years ago
0.4.7
7 years ago
0.4.6
7 years ago
0.4.5
7 years ago
0.4.4
7 years ago
0.4.3
7 years ago
0.4.2
7 years ago
0.4.1
7 years ago
0.4.0
7 years ago
0.3.1
8 years ago
0.3.0
8 years ago
0.2.9
8 years ago
0.2.8
8 years ago
0.2.7
8 years ago
0.2.6
8 years ago
0.2.5
8 years ago
0.2.4
8 years ago
0.2.3
8 years ago
0.2.1
8 years ago
0.2.0
8 years ago
0.1.9
8 years ago
0.1.8
8 years ago
0.1.7
8 years ago
0.1.6
8 years ago
0.1.5
8 years ago
0.1.4
8 years ago
0.1.3
8 years ago
0.1.2
8 years ago
0.1.1
8 years ago