diff options
Diffstat (limited to 'app/pipes.ts')
-rw-r--r-- | app/pipes.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/pipes.ts b/app/pipes.ts new file mode 100644 index 0000000..d9f7ab5 --- /dev/null +++ b/app/pipes.ts @@ -0,0 +1,10 @@ +import {Pipe} from 'angular2/core'; +/// <reference path="moment.d.ts" /> + +@Pipe({name: 'momentDate'}) + +export class MomentDatePipe { + transform(value:string, args:string[]) : any { + return moment(value).format('LLLL'); + } +} |