aboutsummaryrefslogtreecommitdiffstats
path: root/src/Angular.js
diff options
context:
space:
mode:
authorMisko Hevery2010-03-24 16:13:42 -0700
committerMisko Hevery2010-03-24 16:13:42 -0700
commit0c42eb9909d554807549cd3394e0ea0c715cc2d1 (patch)
tree331c637a5c86b87970166a0936874fec9c6920a6 /src/Angular.js
parent3d3694240034b6841c9fdf2e38a2a7955cb592c7 (diff)
downloadangular.js-0c42eb9909d554807549cd3394e0ea0c715cc2d1.tar.bz2
input[type=text] now works with binding, validation, formatter, required
Diffstat (limited to 'src/Angular.js')
-rw-r--r--src/Angular.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Angular.js b/src/Angular.js
index 95f7325a..b76926b9 100644
--- a/src/Angular.js
+++ b/src/Angular.js
@@ -44,6 +44,8 @@ function extensionList(angular, name) {
}
var consoleNode, msie,
+ VALUE = 'value',
+ NOOP = 'noop',
jQuery = window['jQuery'] || window['$'], // weirdness to make IE happy
slice = Array.prototype.slice,
angular = window['angular'] || (window['angular'] = {}),
@@ -92,6 +94,9 @@ function isObject(value){ return typeof value == 'object';}
function isString(value){ return typeof value == 'string';}
function isArray(value) { return value instanceof Array; }
function isFunction(value){ return typeof value == 'function';}
+function lowercase(value){ return isString(value) ? value.toLowerCase() : value; }
+function uppercase(value){ return isString(value) ? value.toUpperCase() : value; }
+function trim(value) { return isString(value) ? value.replace(/^\s*/, '').replace(/\s*$/, '') : value; };
function log(a, b, c){
var console = window['console'];
@@ -244,10 +249,6 @@ function outerHTML(node) {
return outerHTML;
}
-function trim(str) {
- return str.replace(/^ */, '').replace(/ *$/, '');
-}
-
function toBoolean(value) {
var v = ("" + value).toLowerCase();
if (v == 'f' || v == '0' || v == 'false' || v == 'no')