I am developing a dashboard, but I want to hide the image in dashboard that is why I need to come up with this program that can hide the image using template node. Shown below is my code inside template node.
But this code wont work! Please help to check my errors please!
Got it working already, in using script. I need to use scope.$watch in order to read the following msg from the payload. Hope later someone will learn from this
Hi Kenneth. Glad to hear you got a solution. Always good as a learning experience.
For the benefit of future readers, this is original Dashboard-1 which uses the now unsupported angularjs (not the new Dashboard-2 which is Vue based)
The solution above is certainly one approach however there is a much simpler way. In the built in help of the template node, it mentions you can set the class dynamically via msg.className. So, instead, one could have prepared a CSS class that hides the image and simply updated the template via the msg (no angularjs scooped script required)