aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/JSON.js2
-rw-r--r--src/filters.js3
2 files changed, 2 insertions, 3 deletions
diff --git a/src/JSON.js b/src/JSON.js
index 1dc5cc03..7fdbf1a1 100644
--- a/src/JSON.js
+++ b/src/JSON.js
@@ -126,7 +126,7 @@ function toJsonArray(buf, obj, pretty, stack) {
var childPretty = pretty ? pretty + " " : false;
var keys = [];
for(var k in obj) {
- if (obj.hasOwnProperty(k) && obj[k] !== undefined) {
+ if (k!='this' && k!='$parent' && k.substring(0,2) != '$$' && obj.hasOwnProperty(k) && obj[k] !== undefined) {
keys.push(k);
}
}
diff --git a/src/filters.js b/src/filters.js
index 6a136f92..c5d886ea 100644
--- a/src/filters.js
+++ b/src/filters.js
@@ -254,7 +254,6 @@ var GET_TIME_ZONE = /[A-Z]{3}(?![+\-])/,
OPERA_TOSTRING_PATTERN = /^[\d].*Z$/,
NUMBER_STRING = /^\d+$/;
-
/**
* @workInProgress
* @ngdoc filter
@@ -409,7 +408,7 @@ angularFilter.date = function(date, format) {
*/
angularFilter.json = function(object) {
this.$element.addClass("ng-monospace");
- return toJson(object, true);
+ return toJson(object, true, /^(\$|this$)/);
};