From d15905ff4ee961674df584a802caab7b327ecc9d Mon Sep 17 00:00:00 2001 From: Andy Joslin Date: Thu, 6 Feb 2014 16:14:04 -0500 Subject: [PATCH] chore: git add a file --- js/ext/angular/src/directive/ionicBindHtml.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 js/ext/angular/src/directive/ionicBindHtml.js diff --git a/js/ext/angular/src/directive/ionicBindHtml.js b/js/ext/angular/src/directive/ionicBindHtml.js new file mode 100644 index 00000000000..d8460f71fe2 --- /dev/null +++ b/js/ext/angular/src/directive/ionicBindHtml.js @@ -0,0 +1,9 @@ +angular.module('ionic.ui.bindHtml', []) +.directive('bindHtmlUnsafe', function () { + return function (scope, element, attr) { + element.addClass('ng-binding').data('$binding', attr.bindHtmlUnsafe); + scope.$watch(attr.bindHtmlUnsafe, function(value) { + element.html(value || ''); + }); + }; +});