Using Angular 1.5
I have a $http data service that is returning HTML encoded text with directives like ng-click included.
The challenge I am facing is displaying the HTML content while also activating the ng-click directives embedded within it.
Currently, my display method looks like this and works, however, the ng-clicks are not functioning:
<div class="mt10" ng-repeat="row in aqdas.Paragraphs" ng-cloak>
<span ng-bind-html="TrustDangerousSnippet(row.Text)" >
{{row.Text}}
</span>
</div>
Below is the TrustDangerousSnippet function being utilized:
$scope.TrustDangerousSnippet = function (text) {
var val = $sce.trustAsHtml(text);
return val;
};
I am seeking advice on how to modify TrustDangerousSnippet so that the ng-click events in the text can be activated once the content is downloaded via $http request.