<div class="col-md-2" ng-bind-html="html" compile-template>
commonModule.directive('compileTemplate', ["$compile", "$parse", function ($compile, $parse) { return { link: function (scope, element, attr) { var parsed = $parse(attr.ngBindHtml); function getStringValue() { return (parsed(scope) || '').toString(); } scope.$watch(getStringValue, function () { $compile(element, null, -9999)(scope); // The -9999 makes it skip directives so that we do not recompile ourselves }); } } }]);