0.0.1 • Published 7 years ago

ng2-filter-pipe-demo v0.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
7 years ago

ng2-filter-pipe-demo

Installation

To install this library, run:

$ npm install ng2-filter-pipe-demo --save

and then from your Angular AppModule:

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

import { AppComponent } from './app.component';

// Import library
import { SearchModule } from 'ng2-filter-pipe-demo';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,

    // Specify your library as an import
    SearchModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Once your library is imported, you can use its pipes in your Angular application:

<!-- You can now use library component in app.component.html -->
<input type="text" [(ngModel)]="filter" placeholder="Search...">
<ul>
  <li *ngFor="let item of items | search: filter">
    {{ items.firstName }}
    {{ items.lastName }}
  </li>
<ul/

License

MIT © Limarenko Denis