From a50ed987bcec57c948c84bd4eb4f210c9443fb37 Mon Sep 17 00:00:00 2001 From: Spencer Applegate Date: Fri, 28 Jun 2013 23:00:31 -0400 Subject: [PATCH] Update Angular.js toJson documentation I included in angular.toJson's description that any properties with a leading '$' character will be stripped from the result since angular uses this notation internally for services. There have been complaints of not knowing about this functionality until it breaks within their code. It would be a nice addition to avoid any confusion in the future. An example of a documentation update request is within a comment in issue #1463. --- src/Angular.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Angular.js b/src/Angular.js index c5e54c98b6d6..5caf466578f4 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -755,7 +755,8 @@ function toJsonReplacer(key, value) { * @function * * @description - * Serializes input into a JSON-formatted string. + * Serializes input into a JSON-formatted string. Properties with leading $ characters will be + * stripped since angular uses this notation internally. * * @param {Object|Array|Date|string|number} obj Input to be serialized into JSON. * @param {boolean=} pretty If set to true, the JSON output will contain newlines and whitespace.