diff options
| author | Spencer Applegate | 2013-06-28 23:00:31 -0400 | 
|---|---|---|
| committer | Pete Bacon Darwin | 2013-07-01 11:35:16 +0100 | 
| commit | 1532ec1dfe6a200481ba94601b9e49c92879dc2d (patch) | |
| tree | 52a9292f9f4abff0fb3c934c165e72cde39f0fcc /src/Angular.js | |
| parent | a22596c925a41c6f9b78cb21e18894987bbbc84b (diff) | |
| download | angular.js-1532ec1dfe6a200481ba94601b9e49c92879dc2d.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.
Diffstat (limited to 'src/Angular.js')
| -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 c5e54c98..5caf4665 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. | 
