aboutsummaryrefslogtreecommitdiffstats
path: root/src/filters.js
diff options
context:
space:
mode:
authorMisko Hevery2011-08-17 12:21:43 -0700
committerIgor Minar2011-10-11 10:53:03 -0700
commite134a8335f5ee7d2e81034ed93f3e465cb14573f (patch)
treea01dc685708c5db9e1e564853bb292d6f7ad7a7a /src/filters.js
parent8ee32a75f07da96ec1cc4a8474a9a53e5c2aca98 (diff)
downloadangular.js-e134a8335f5ee7d2e81034ed93f3e465cb14573f.tar.bz2
fix(filter): make json filter ignore private properties
Diffstat (limited to 'src/filters.js')
-rw-r--r--src/filters.js3
1 files changed, 1 insertions, 2 deletions
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$)/);
};