diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 8 | 
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Angular.js b/src/Angular.js index 4443890a..27f463ac 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -5,6 +5,8 @@ if (!window['console']) window['console']={'log':noop, 'error':noop};  var consoleNode,      NOOP              = 'noop', +    NG_ERROR          = 'ng-error', +    NG_VALIDATION_ERROR = 'ng-validation-error',      jQuery            = window['jQuery'] || window['$'], // weirdness to make IE happy      _                 = window['_'],      jqLite            = jQuery || jqLiteWrap, @@ -226,12 +228,12 @@ function escapeHtml(html) {        replace(/>/g, '>');  } -function elementDecorateError(element, error) { +function elementError(element, type, error) {    if (error) { -    element.addClass(NG_VALIDATION_ERROR); +    element.addClass(type);      element.attr(NG_ERROR, error);    } else { -    element.removeClass(NG_VALIDATION_ERROR); +    element.removeClass(type);      element.removeAttr(NG_ERROR);    }  }  | 
