An open API service indexing awesome lists of open source software.

https://github.com/ramyhakam/ngfor-filter-pipe

Customizable pipe with property value For ngFor
https://github.com/ramyhakam/ngfor-filter-pipe

Last synced: 6 months ago
JSON representation

Customizable pipe with property value For ngFor

Awesome Lists containing this project

README

          

# NgforPipe

This Module is a simple Custom pipe which can be used to filter ngFor input array with certin property on the elemnts

## Install

Run `npm install ngfor-pipe`

## Usage
import NgforPipeModule in your Project
```typescript
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import{NgforPipeModule} from 'ngfor-pipe';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent,
],
imports: [
BrowserModule,
NgforPipeModule,

],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
```

Then Use the filter in ngFor in your component
With the property and the vaule as args to ngforFilter.
```html


  • {{trip.From}}
    {{trip.to}}
    {{trip.airport}}


  • ```
    You can now use binding to filter ngFor with any value for this property.