diff options
Diffstat (limited to 'src/Angular.js')
| -rw-r--r-- | src/Angular.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Angular.js b/src/Angular.js index d00a9bf6..0952a352 100644 --- a/src/Angular.js +++ b/src/Angular.js @@ -247,7 +247,16 @@ function escapeHtml(html) { replace(/>/g, '>'); } + +function isRenderableElement(element) { + var name = element && element[0] && element[0].nodeName; + return name && name.charAt(0) != '#' && + !includes(['TR', 'COL', 'COLGROUP', 'TBODY', 'THEAD', 'TFOOT'], name); +} function elementError(element, type, error) { + while (!isRenderableElement(element)) { + element = element.parent() || jqLite(document.body); + } if (error) { element.addClass(type); element.attr(NG_ERROR, error); |
