diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js index 12293ddb..e49eb9a9 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -228,6 +228,16 @@ function escapeHtml(html) { replace(/>/g, '>'); } +function elementDecorateError(element, error) { + if (error) { + element.addClass(NG_VALIDATION_ERROR); + element.attr(NG_ERROR, error); + } else { + element.removeClass(NG_VALIDATION_ERROR); + element.removeAttr(NG_ERROR); + } +} + function escapeAttr(html) { if (!html || !html.replace) return html; |
