From df6de716ad81122201751ecd1af9451a598650cd Mon Sep 17 00:00:00 2001 From: danrevah Date: Sun, 27 Nov 2016 23:51:47 +0200 Subject: [PATCH] README.md --- README.md | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/README.md b/README.md index 3b7fda6c..77417e26 100644 --- a/README.md +++ b/README.md @@ -70,38 +70,38 @@ 1. Use npm to install the package -```terminal -$ npm install ng2-pipes --save -``` + ```terminal + $ npm install ng2-pipes --save + ``` 2. You could either add into your module `imports` the `NgPipesModule` in order to add all of the pipes, Or add a specific module such as `NgArrayPipesModule`, `NgStringPipesModule`, `NgMathPipesModule` or `NgBooleanPipesModule`. -```typescript -import {NgPipesModule} from 'ng2-pipes'; - -@NgModule({ - // ... - imports: [ + ```typescript + import {NgPipesModule} from 'ng2-pipes'; + + @NgModule({ // ... - NgPipesModule - ] -}) -``` + imports: [ + // ... + NgPipesModule + ] + }) + ``` 3. Pipes are also injectable and can be used in Components / Services / etc.. -```typescript -@Component({ - // .. - providers: [ReversePipe] -}) -export class AppComponent { - constructor(private reversePipe: ReversePipe) { - this.reversePipe.transform('foo'); // Returns: "oof" + ```typescript + @Component({ + // .. + providers: [ReversePipe] + }) + export class AppComponent { + constructor(private reversePipe: ReversePipe) { + this.reversePipe.transform('foo'); // Returns: "oof" + } + // .. } - // .. -} -``` + ```