.directive('ngBindHtmlUnsafe', function() { return { link: function(scope, element, attributes) { function handler(html) {element.html(html);} element.bind('$destroy', scope.$watch(attributes.ngBindHtmlUnsafe, handler)); } }; })