There is a fairly common task that AngularJS can easily cope with, as I thought and probably still think.
There is a latex string that is displayed in my own directive.
<latex>{{ task.taskMessage }}</latex> Apparently, the directive is processed before the execution of the expression, so I have:
.directive("latex", function () { return { restrict: 'E', link: function (scope, element, attrs) { console.log(element[0].textContent); // '{{ task.taskMessage }}' // katex.render(element[0].textContent, element[0]); } }; }) I climbed on forums and blogs, there are similar issues resolved via data-content, $ watcher, and, not knowing it, with the help of ng-bind-html. So how is it all the same to organize exactly my version?
task.taskMessagein a directive, then you can hang $ watch or $ timeout and get it in them. Or output{{task.taskMessage}}through another directive priority, which will be higher. PS I am not very strong in an angulara, but I think it might work. - whispeer