diff options
Diffstat (limited to 'docs/components')
| -rw-r--r-- | docs/components/angular-bootstrap/bootstrap-prettify.js | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/docs/components/angular-bootstrap/bootstrap-prettify.js b/docs/components/angular-bootstrap/bootstrap-prettify.js index c0496c2c..101bc801 100644 --- a/docs/components/angular-bootstrap/bootstrap-prettify.js +++ b/docs/components/angular-bootstrap/bootstrap-prettify.js @@ -169,21 +169,23 @@ directive.ngSetHtml = ['getEmbeddedTemplate', function(getEmbeddedTemplate) { directive.ngEvalJavascript = ['getEmbeddedTemplate', function(getEmbeddedTemplate) { return { compile: function (element, attr) { - var script = getEmbeddedTemplate(attr.ngEvalJavascript); - - try { - if (window.execScript) { // IE - window.execScript(script || '""'); // IE complains when evaling empty string - } else { - window.eval(script); - } - } catch (e) { - if (window.console) { - window.console.log(script, '\n', e); - } else { - window.alert(e); + var fileNames = attr.ngEvalJavascript.split(' '); + angular.forEach(fileNames, function(fileName) { + var script = getEmbeddedTemplate(fileName); + try { + if (window.execScript) { // IE + window.execScript(script || '""'); // IE complains when evaling empty string + } else { + window.eval(script + '//@ sourceURL=' + fileName); + } + } catch (e) { + if (window.console) { + window.console.log(script, '\n', e); + } else { + window.alert(e); + } } - } + }); } }; }]; |
