angular2
Version:
Angular 2 - a web framework for modern web apps
26 lines (25 loc) • 551 B
TypeScript
import { PipeTransform } from 'angular2/src/core/change_detection';
/**
* Implements json transforms to any object.
*
* ### Example
*
* In this example we transform the user object to json.
*
* ```
* @Component({
* selector: "user-cmp",
* template: "User: {{ user | json }}"
* })
* class Username {
* user:Object
* constructor() {
* this.user = { name: "PatrickJS" };
* }
* }
*
* ```
*/
export declare class JsonPipe implements PipeTransform {
transform(value: any, args?: any[]): string;
}