ng2-alphabet-sort

0.1.3 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i ng2-alphabet-sort

Weekly Downloads

0

Version

0.1.3

License

MIT

Last publish

Collaborators

  • limarenkodenis