I am facing an issue with a JSON file that contains the page content I am trying to load. The link within it appears as follows:
<a data-ng-click='foo()'>Bar</a>
When I load this page content into the HTML page:
<p class="body" ng-bind-html="jsonText | raw"></p>
by applying this filter:
app.filter('raw', function ($sce) {
return function (input) {
return $sce.trustAsHtml(input);
}
});
The problem is that the link does not trigger the foo()
function when clicked. I am unsure if what I am attempting is impossible or if there is an error in my approach. Can anyone provide guidance on this issue?