Is it possible to bind data of scope variable to a html that is about to bind as ng-bind-html?
ie, I have a
html =\"{{caption}}
You need to compile your HTML snippet, but it is recommended to do that inside the directive.
app.controller('MyCtrl', function($compile){ $scope.caption = 'My Caption'; $scope.html = $compile('{{caption}}')($scope); });