Skip to content

Instantly share code, notes, and snippets.

@confraria
Last active January 30, 2017 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save confraria/164b242ba1ecd48295a908a4eb2fe0c9 to your computer and use it in GitHub Desktop.
Save confraria/164b242ba1ecd48295a908a4eb2fe0c9 to your computer and use it in GitHub Desktop.
Example of html widget
<!-- this is needed to initialize the variable -->
<i style="display:none">{{device.valueToRead}}</i>
<div style="transition:none" ng-show="device.valueToRead > 10"> more than 10</div>
<div style="transition:none" ng-show="device.valueToRead == 10"> exactly 10!</div>
<div style="transition:none" ng-show="device.valueToRead < 10"> less than 10!</div>
<div ng-switch="device.valueToRead">
<div style="transition:none" ng-switch-when="high" >HIGH</div>
<div style="transition:none" ng-switch-when="low">LOW</div>
<div style="transition:none" ng-switch-default>DEFAULT</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment