mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-03-22 09:30:28 +00:00
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.
This commit is contained in:
parent
9a77d03047
commit
d2be5939dc
1 changed files with 2 additions and 1 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Reference in a new issue