0.1.3 • Published 7 years ago

ng2-alphabet-sort v0.1.3

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

ng2-alphabet-sort

Installation

To install this library, run:

$ npm i ng2-alphabet-sort --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 { Ng2AlphabetSortModule } from 'ng2-alphabet-sort';

@NgModule({
  declarations: [
    AppComponent,
    ...
  ],
  imports: [
    BrowserModule,
    ...
    // Specify your library as an declarations
    Ng2AlphabetSortModule
  ],
  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 -->
<ul>
  <li *ngFor="let item of items | ng2AlpabetSort: 'string, object property name'">
    {{ items.firstName }}
    {{ items.lastName }}
    {{ items.country }}
    {{ items.city }}
  </li>
<ul/

License

MIT © Limarenko Denis

0.1.3

7 years ago

0.1.2

7 years ago

0.0.1

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago