To use ng-bind-compile for bind html with compilation.

HTML

        <div ng-bind-html="html"></div>
        <div ng-bind-compile="html"></div>
      

JavaScript

        $scope.html = $sce.trustAsHtml('<button ng-click="click()">Click</button>');
        $scope.click = function() {
          alert('Compiled.');
        }
      

ng-bind-html

ng-click will not work.

ng-bind-compile

ng-click will work.