* @ngdoc filter * @name json * @kind function * * @description * Allows you to convert a JavaScript object into JSON string. * * This filter is mostly useful for debugging. When using the double curly {{value}} notation * the binding is automatically converted to JSON. * * @param {*}
()
| 19060 | * |
| 19061 | */ |
| 19062 | function jsonFilter() { |
| 19063 | return function(object, spacing) { |
| 19064 | if (isUndefined(spacing)) { |
| 19065 | spacing = 2; |
| 19066 | } |
| 19067 | return toJson(object, spacing); |
| 19068 | }; |
| 19069 | } |
| 19070 | |
| 19071 | |
| 19072 | /** |
nothing calls this directly
no test coverage detected