re-binding jquery selectors in angular
<p>I have a very simple angular application that has one service which uses a http request to pull down a web page. I then want to display that page within my application using <code>ng-bind-html</code>.</p>

<p>template:</p>

<pre><code>&lt;div class="container" ng-bind-html="data"&gt;&lt;/div&gt;
</code></pre>

<p>controller:</p>

<pre><code>this.service.getHoliday().then(function(data) {
    $scope.data = $sce.trustAsHtml(data);
});
</code></pre>

<p>this works from a visual perspective, however it would appear the javascript/jquery files are loaded but not used. I feel like this is because the elements are not available when it is run. </p>

<p>I feel like the best option to resolve this is to somehow rebind all the elements, is it possible to rebind the entire page without caring about each individual selector. </p>

<p>I've tried using a <code>$apply()</code> method, wrapping the above like so:</p>

<pre><code>this.service.getHoliday().then(function(data) {
    $scope.$apply(function() {
        $scope.data = $sce.trustAsHtml(data);
    });
});
</code></pre>

<p>but this stops the page from loading the html completely, i understand that this is vague but hopefully someone has come up against a similar issue that can help. </p>