Wow Julian,
Had the impression that you answered my question, before I had posted it ...
Have added (similar to your example) the extra binding in the raw html part:
function HTML(config) {
var html = String.raw`<div ng-bind-html="msg.payload"></div>...`;
return html;
};
However then my callback function (defined in the initController) is still NOT called.
Afterwards I have moved the entire callback function registration to the raw html:
function HTML(config) {
var html = String.raw`<div ng-bind-html="msg.payload"></div>
...
<script>
;(function(scope) {
scope.$watch('msg.payload', function(newVal, oldVal) {
debugger;
})
})(scope)
...
</script>`;
return html;
};
However then the callback still isn't called.
PS. Everytime is say 'is not called' this means that it is only called after a page reset, but then the 'msg' is 'undefined'. When I inject an input message, it is not called...