GithubHelp home page GithubHelp logo

developeramarish / ng-pipes Goto Github PK

View Code? Open in Web Editor NEW

This project forked from a8m/ng-pipes

0.0 1.0 0.0 342 KB

Bunch of useful pipes for Angular2 (with no external dependencies!)

Home Page: https://a8m.github.io/ng-pipes/

License: MIT License

JavaScript 0.37% TypeScript 99.63%

ng-pipes's Introduction

ng-pipes   NPM version Build status License Join the chat at https://gitter.im/ng-pipes/Lobby

a8m/angular-filter for Angular (2+)

For the AngularJS version of this module, please see angular-filter.

Installation

npm install --save ng-pipes

or

yarn add ng-pipes

Get Started

There are 3 ways of adding ng-pipes to your project:

  1. Import all pipes
  2. Import pipes by module
  3. Declare specific pipes

Import all pipes

import { NgPipesModule } from 'ng-pipes';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    NgPipesModule
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
<h1>
  {{ title | reverse }}
</h1>

Import pipes by module

import {BooleanPipesModule, CollectionPipesModule, MathPipesModule, ObjectPipesModule, StringPipesModule} from 'ng-pipes';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BooleanPipesModule,     // imports all pipes of the boolean module
    CollectionPipesModule,  // imports all pipes of the collection module
    MathPipesModule,        // imports all pipes of the math module
    ObjectPipesModule,      // imports all pipes of the object module
    StringPipesModule       // imports all pipes of the string module
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
<h1>
  {{ title | reverse }}
</h1>

Declare specific pipes

import { ReversePipe, CeilPipe, ... } from 'ng-pipes';
// ...

@NgModule({
  declarations: [
    AppComponent, ReversePipe, CeilPipe, ...
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
<h1>
  {{ title | reverse }}
</h1>

Contributing

  • Any contribution is appreciated.
  • If you are planning to add a new pipe (or any other feature), please open an issue before.
  • Angular Commit Message Format is preferred.

Submitting a Pull Request (PR)

  1. Clone the project via:
$ git clone https://github.com/a8m/ng-pipes.git
  1. Make your changes in a new git branch:
$ git checkout -b my-cool-branch master
  1. Add your changes, including appropriate test cases.

  2. Push your branch to Github.

  3. Create a PR to master.

ng-pipes's People

Contributors

rafaelss95 avatar a8m avatar stevevanopstal avatar gitter-badger avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.