ng2-alphabet-sort
v0.1.3
Published
## Installation
Downloads
6
Readme
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