* @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 {*}
()
| 17250 | * |
| 17251 | */ |
| 17252 | function jsonFilter() { |
| 17253 | return function(object, spacing) { |
| 17254 | if (isUndefined(spacing)) { |
| 17255 | spacing = 2; |
| 17256 | } |
| 17257 | return toJson(object, spacing); |
| 17258 | }; |
| 17259 | } |
| 17260 | |
| 17261 | |
| 17262 | /** |
nothing calls this directly
no test coverage detected