aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisko Hevery2010-01-28 20:44:34 -0800
committerMisko Hevery2010-01-28 20:44:34 -0800
commit3d99e0f6dee6569ca9471d419bda79aec95b9ebc (patch)
tree8afd70b773b9131aeacef7f7d24b92857aa205c4
parent473e57e22532f9b85fc9dcc1bcc53e12a10154c2 (diff)
downloadangular.js-3d99e0f6dee6569ca9471d419bda79aec95b9ebc.tar.bz2
work
-rw-r--r--src/Angular.js1
-rw-r--r--src/Formaters.js6
-rw-r--r--src/Scope.js2
-rw-r--r--test/ApiTest.js2
-rw-r--r--test/FormatersTest.js6
5 files changed, 15 insertions, 2 deletions
diff --git a/src/Angular.js b/src/Angular.js
index bfbe8ee9..b208d0ec 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -26,6 +26,7 @@ var consoleNode, jQuery, msie,
angular = window['angular'] || (window['angular'] = {}),
angularValidator = angular['validator'] || (angular['validator'] = {}),
angularFilter = angular['filter'] || (angular['filter'] = {}),
+ angularFormater = angular['formater'] || (angular['formater'] = {}),
angularCallbacks = angular['callbacks'] || (angular['callbacks'] = {}),
angularAlert = angular['alert'] || (angular['alert'] = function(){
log(arguments); window.alert.apply(window, arguments);
diff --git a/src/Formaters.js b/src/Formaters.js
new file mode 100644
index 00000000..e623d6b8
--- /dev/null
+++ b/src/Formaters.js
@@ -0,0 +1,6 @@
+
+extend(angularFormater, {
+ 'noop':function(){
+
+ }
+});
diff --git a/src/Scope.js b/src/Scope.js
index 7e477ec5..b8fadfa0 100644
--- a/src/Scope.js
+++ b/src/Scope.js
@@ -95,7 +95,7 @@ Scope.prototype = {
},
eval: function(expressionText, context) {
- log('Scope.eval', expressionText);
+// log('Scope.eval', expressionText);
var expression = Scope.expressionCache[expressionText];
if (!expression) {
var parser = new Parser(expressionText);
diff --git a/test/ApiTest.js b/test/ApiTest.js
index 250a27b1..35cbbd81 100644
--- a/test/ApiTest.js
+++ b/test/ApiTest.js
@@ -204,7 +204,7 @@ ApiTest.prototype.testQuoteString = function(){
};
ApiTest.prototype.testQuoteStringBug = function(){
- assertEquals(angular.String.quote('"7\\\\\\\"7"', "7\\\"7"));
+ assertEquals(angular.String.quote("7\\\"7"), '"7\\\\\\\"7"');
};
ApiTest.prototype.testQuoteUnicode = function(){
diff --git a/test/FormatersTest.js b/test/FormatersTest.js
new file mode 100644
index 00000000..0122b6ad
--- /dev/null
+++ b/test/FormatersTest.js
@@ -0,0 +1,6 @@
+TestCase("formaterTest", {
+ testNoop: function(){
+ assertEquals("abc", angular.formater.noop("abc"));
+ assertEquals("xyz", angular.formater.noop("abc", "xyz"));
+ }
+});