From fc016b59dcf13161d0396bd868bcc4a6e5efce08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Duque?= Date: Tue, 27 Oct 2015 10:18:29 +0000 Subject: [PATCH] fix(JsonPipe): marks json pipe as not pure Marked json pipe as not pure so that it runs all the time, reflecting changes on the object. Closes #4821 --- modules/angular2/src/core/pipes/json_pipe.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/angular2/src/core/pipes/json_pipe.ts b/modules/angular2/src/core/pipes/json_pipe.ts index 5e116af530..8eaaa401a6 100644 --- a/modules/angular2/src/core/pipes/json_pipe.ts +++ b/modules/angular2/src/core/pipes/json_pipe.ts @@ -5,6 +5,7 @@ import {Pipe} from 'angular2/src/core/metadata'; /** * Implements json transforms to any object. + * The json pipe runs all the time checking for changes on the transformed object. * * ### Example * @@ -25,7 +26,7 @@ import {Pipe} from 'angular2/src/core/metadata'; * ``` */ @CONST() -@Pipe({name: 'json'}) +@Pipe({name: 'json', pure: false}) @Injectable() export class JsonPipe implements PipeTransform { transform(value: any, args: any[] = null): string { return Json.stringify(value); }