OLD | NEW |
1 part of angular.filter; | 1 part of angular.formatter_internal; |
2 | 2 |
3 /** | 3 /** |
4 * Allows you to convert a JavaScript object into JSON string. This filter is | 4 * Allows you to convert a JavaScript object into JSON string. This formatter is |
5 * mostly useful for debugging. | 5 * mostly useful for debugging. |
6 * | 6 * |
7 * Usage: | 7 * Usage: |
8 * | 8 * |
9 * {{ json_expression | json }} | 9 * {{ json_expression | json }} |
10 */ | 10 */ |
11 @NgFilter(name:'json') | 11 @Formatter(name:'json') |
12 class JsonFilter { | 12 class Json implements Function { |
13 call(text) => JSON.encode(text); | 13 String call(jsonObj) => JSON.encode(jsonObj); |
14 } | 14 } |
OLD | NEW |