Make sure you have TODAY’s Node-Red changes and TODAY’s UYI updates – it just keeps getting better. I’m getting a feeling about this one… could be a winner.
--
You received this message because you are subscribed to a topic in the Google Groups "Node-RED UI" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red-contrib-ui/zBRHo2HGx3A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red-contri...@googlegroups.com.
To post to this group, send email to node-red-...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red-contrib-ui/58ceae68-e6c9-4b55-a36b-28d0785a3690%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
<div flex layout="row" layout-align="space-around center"> <md-button ng-repeat="b in buttons" class="md-icon-button" ng-click="click(b)"> <ng-md-icon icon="{{msg.payload[b.payload]?b.icon2:b.icon}}" ng-style="{color: msg.payload[b.payload]?b.color2:b.color}"></ng-md-icon> </md-button></div>
<script> scope.buttons = [{ icon: 'pause', color: 'black', icon2: 'play_arrow', color2: 'red', payload: 'play', }, { icon: 'alarm', color: 'black', icon2: 'alarm', color2: 'red', payload: 'alarm', }]; scope.click = function(b) { if (!this.msg) this.msg = {}; if (!this.msg.payload) this.msg.payload = {}; this.msg.payload[b.payload] = !this.msg.payload[b.payload]; this.send(this.msg); }.bind(scope);</script>