title: call function inside $sce.trustAsHtml() string in Angular js
body: <p>I am developing an app using Angularjs and adding <code>HTML</code> using <code>$sce.trustAsHtml()</code> in my page. I want to call a function in above dynamically added content. My html and script as below.</p>
  <h2>HTML</h2>
  <pre><code>&lt;div ng-app=&quot;ngBindHtmlExample&quot;&gt;
    &lt;div ng-controller=&quot;ngBindHtmlCtrl&quot;&gt;
     &lt;p ng-bind-html=&quot;myHTML&quot;&gt;&lt;/p&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <h2>Javascript</h2>
  <pre><code>angular.module('ngBindHtmlExample', ['ngSanitize'])
  
  .controller('ngBindHtmlCtrl', ['$scope','$sce', function ngBindHtmlCtrl($scope, $sce) {
    $scope.myHTML =$sce.trustAsHtml(
       'I am an &lt;code&gt;HTML&lt;/code&gt;string with &lt;a href=&quot;#&quot; ng-mouseover=&quot;removeExp()&quot;&gt;links!&lt;/a&gt; and other &lt;em&gt;stuff&lt;/em&gt;');
    
      $scope.removeExp = function (){
         console.log('dfdfgdfgdfg');
      }
  }]);
  </code></pre>
  <h2>jsfiddle</h2>
  <p><a href="http://jsfiddle.net/UbjZL/" rel="noreferrer">Click Here to see</a></p>