From 2f1f83a186a0d1a3afcba09cccf3cbb09bc00fe6 Mon Sep 17 00:00:00 2001 From: Victor Berchet Date: Tue, 27 Oct 2015 12:43:00 -0700 Subject: [PATCH] fix(Pipes): mark date & slice as non-pure --- modules/angular2/src/core/pipes/date_pipe.ts | 2 +- modules/angular2/src/core/pipes/slice_pipe.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/angular2/src/core/pipes/date_pipe.ts b/modules/angular2/src/core/pipes/date_pipe.ts index c2670cf1ba..b1c39d5e6e 100644 --- a/modules/angular2/src/core/pipes/date_pipe.ts +++ b/modules/angular2/src/core/pipes/date_pipe.ts @@ -78,7 +78,7 @@ var defaultLocale: string = 'en-US'; * {{ dateObj | date:'mmss' }} // output is '43:11' */ @CONST() -@Pipe({name: 'date'}) +@Pipe({name: 'date', pure: false}) @Injectable() export class DatePipe implements PipeTransform { /** @internal */ diff --git a/modules/angular2/src/core/pipes/slice_pipe.ts b/modules/angular2/src/core/pipes/slice_pipe.ts index 1590f78563..cb69a3ceae 100644 --- a/modules/angular2/src/core/pipes/slice_pipe.ts +++ b/modules/angular2/src/core/pipes/slice_pipe.ts @@ -67,7 +67,7 @@ import {Pipe} from '../metadata'; * {{ 'abcdefghij' | slice: 100 }} // output is '' */ -@Pipe({name: 'slice'}) +@Pipe({name: 'slice', pure: false}) @Injectable() export class SlicePipe implements PipeTransform { transform(value: any, args: any[] = null): any {