I am currently working on a directive which looks like this:
...
template: function(element, attrs) {
var htmlTemplate = '<div class="start-it" ng-if="isVisible">\
<p ng-bind-html="\'{{customDynamicText}}\' | translate"></p>\
</div>';
return htmlTemplate;
},
...
(I am also using the translate plugin in this directive)
The problem I am facing is that the value of this dynamic variable changes in the scope, but it does not reflect the change in the directive.
When I use attrs-params (it works fine for static strings but not for dynamic variables like customDynamicText
), the issue arises.
Is there a way to utilize this dynamic variable in the directive template
with ng-bind-html
?
Is there a solution for this?