Custom Widget - Selection

If you want icons, or if you want the buttons not coming from the channel you could change the code in the widget to something like this. The buttons & icons are than defined in the array of the ng-init part

<div class="btn-group btn-group-justified" btn-checkbox-true 
     ng-init="options = 	[{'value': 'play','label': 'Playing', 'icon': 'glyphicon glyphicon-play'},{'value': 'pause','label': 'Pause', 'icon': 'glyphicon glyphicon-pause'}]">
  
  <label class="btn btn-primary" ng-model="itemValue(config.string_item)" uib-btn-radio="option.value"
ng-click="sendCmd(config.string_item, option.value)" ng-repeat="option in options">
	<span class={{option.icon}} aria-hidden="true"></span>{{option.label}}</label>
</div>

4 Likes