<!DOCTYPE html><img src="http://xxx.xxx.xxx.xxx:9000/music/current/cover.jpg?player=b8:28:eb:bc:be:13" height="42" width="42" /><!DOCTYPE html><img src="{{{payload.cover_url}}}" height="42" width="42" />Normally, getting Angular to output HTML is simply a case of wrapping in triple brackets {{{msg.payload}}} but this doesn't seem to work with Dashboard.
Instead, use the alternative syntax:
<div ng-bind-html="msg.payload"></div>
<div ng-bind-html="msg.payload"></div>
<script>
//console.dir(scope) // this also works
//console.dir(scope.msg) // This doesn't because scope.msg doesn't yet exist
// Lambda function to access the Angular Scope
;(function(scope) {
//console.log('--- SCOPE ---')
//console.dir(scope) // this works but you only get it once (on startup)
//console.dir(scope.msg) // Doesn't work for because scope.msg doesn't yet exist
//Have to use $watch so we pick up new, incoming msg's
scope.$watch('msg.payload', function(newVal, oldVal) {
console.log('- Scope.msg -')
console.dir(scope.msg)
})
})(scope)
</script>You don't really need the script stuff for your question but you might find it useful later on.
<div ng-bind-html="msg.payload"></div><img src={{{msg.payload}}} height="42" width="42" />To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/68b45f6f-6f4c-4c1a-9058-21737d89204f%40googlegroups.com.--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
image once you get the template syntax right.
<!DOCTYPE html><img src="{{{msg.payload}}}" height="42" width="42" />To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.