ng4-pipes
TypeScript icon, indicating that this package has built-in type declarations

0.6.1 • Public • Published

ng4-pipes

A simple yet elegant way to apply filtering functionality on your HTML tables in Angular using pipes.

Search Filter

Table - initially

table

Table - Filtering by Name

filteres by name

Table - Filtering by fields 10th and Age

filtered by age

Installation

Install using npm

npm install --save ng4-pipes

Usage

  1. Import into your.module.ts
import { SearchFilter } from "ng4-pipes/src/app/pipes/searchFilter"
 
// and  add in your module's declarations array 
declarations[ 
    SearchFilter 
    ]
  1. Import the required filter in your.component.ts
import { SearchFilter } from "ng4-pipes/src/app/pipes/searchFilter";
  1. Use in your.component.html

Define the textbox to be used to search in the table

<input type="text" [(ngModel)]="search"/>

Use the pipe on the target table

<tr *ngFor="let student of students | SearchFilter:search">

Troubleshooting

Please follow this guidelines when reporting bugs and feature requests:

  1. Use GitHub Issues board to report bugs and feature requests (not our email address)
  2. Please always write steps to reproduce the error. That way we can focus on fixing the bug, not scratching our heads trying to reproduce it.

Thanks for understanding!

License

The MIT License (see the LICENSE file for the full text)

Package Sidebar

Install

npm i ng4-pipes

Weekly Downloads

7

Version

0.6.1

License

MIT

Last publish

Collaborators

  • soniabehal