diff options
Diffstat (limited to 'js-old/directive/NewsBindUnsafeHtml.js')
-rw-r--r-- | js-old/directive/NewsBindUnsafeHtml.js | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/js-old/directive/NewsBindUnsafeHtml.js b/js-old/directive/NewsBindUnsafeHtml.js new file mode 100644 index 000000000..63910532c --- /dev/null +++ b/js-old/directive/NewsBindUnsafeHtml.js @@ -0,0 +1,18 @@ +/** + * Nextcloud - News + * + * This file is licensed under the Affero General Public License version 3 or + * later. See the COPYING file. + * + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright Bernhard Posselt 2014 + */ +app.directive('newsBindHtmlUnsafe', function () { + 'use strict'; + + return function (scope, elem, attr) { + scope.$watch(attr.newsBindHtmlUnsafe, function () { + elem.html(scope.$eval(attr.newsBindHtmlUnsafe)); + }); + }; +});
\ No newline at end of file |