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
This commit is contained in:
Sebastián Duque 2015-10-27 10:18:29 +00:00 committed by Victor Berchet
parent e1337dc325
commit fc016b59dc
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import {Pipe} from 'angular2/src/core/metadata';
/** /**
* Implements json transforms to any object. * Implements json transforms to any object.
* The json pipe runs all the time checking for changes on the transformed object.
* *
* ### Example * ### Example
* *
@ -25,7 +26,7 @@ import {Pipe} from 'angular2/src/core/metadata';
* ``` * ```
*/ */
@CONST() @CONST()
@Pipe({name: 'json'}) @Pipe({name: 'json', pure: false})
@Injectable() @Injectable()
export class JsonPipe implements PipeTransform { export class JsonPipe implements PipeTransform {
transform(value: any, args: any[] = null): string { return Json.stringify(value); } transform(value: any, args: any[] = null): string { return Json.stringify(value); }