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
- Host: GitHub
- URL: https://github.com/ramyhakam/ngfor-filter-pipe
- Owner: RamyHakam
- License: mit
- Created: 2018-02-25T18:46:40.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-02-25T21:13:55.000Z (over 7 years ago)
- Last Synced: 2024-05-02T04:45:14.375Z (over 1 year ago)
- Language: TypeScript
- Size: 1.41 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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.