json_pipe.js
1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import { Pipe } from '@angular/core';
/**
* \@ngModule CommonModule
* \@whatItDoes Converts value into JSON string.
* \@howToUse `expression | json`
* \@description
*
* Converts value into string using `JSON.stringify`. Useful for debugging.
*
* ### Example
* {\@example common/pipes/ts/json_pipe.ts region='JsonPipe'}
*
* \@stable
*/
export var JsonPipe = (function () {
function JsonPipe() {
}
/**
* @param {?} value
* @return {?}
*/
JsonPipe.prototype.transform = function (value) { return JSON.stringify(value, null, 2); };
JsonPipe.decorators = [
{ type: Pipe, args: [{ name: 'json', pure: false },] },
];
/** @nocollapse */
JsonPipe.ctorParameters = function () { return []; };
return JsonPipe;
}());
function JsonPipe_tsickle_Closure_declarations() {
/** @type {?} */
JsonPipe.decorators;
/**
* @nocollapse
* @type {?}
*/
JsonPipe.ctorParameters;
}
//# sourceMappingURL=json_pipe.js.map