The problem here is: the ng-bind-html
does simply output the content of the variable. What you need here is a component, that $compiles
the code, to make additional directives work.
<div ng-compile-html="accident.description.impact"></div>
Javascript:
directives.directive("ngCompileHtml", function ($http, $compile)
{
return {
restrict: "A",
scope: {
"ngCompileHtml": "="
},
link: function (scope, element)
{
var template = angular.element(scope.ngCompileHtml);
$compile(template.contents())(scope);
$(element).append(template);
}
};
});