diff options
| author | Spencer Applegate | 2013-06-28 23:00:31 -0400 |
|---|---|---|
| committer | Pete Bacon Darwin | 2013-07-01 11:36:17 +0100 |
| commit | d2be5939dc7ec3b756a34175b2af5c99427411c0 (patch) | |
| tree | 2acfc4beb0df6912442afa4c1143a65160633e21 | |
| parent | 9a77d030471939464cd8ee1fb4b1af0a3532d799 (diff) | |
| download | angular.js-d2be5939dc7ec3b756a34175b2af5c99427411c0.tar.bz2 | |
docs(Angular.js): explain that toJson strips $... properties
In Angular.toJson, any properties with a leading '$' character will be
stripped from the resulting string since angular uses this notation
internally for services. There have been complaints of not knowing
about this functionality until it breaks within their code.
| -rw-r--r-- | src/Angular.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Angular.js b/src/Angular.js index eeafb8b7..95b20139 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -746,7 +746,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. |
