Skip to content

Instantly share code, notes, and snippets.

@jochasinga
Last active August 29, 2015 14:07
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jochasinga/c720677640e026381366 to your computer and use it in GitHub Desktop.
HTML + Angular displaying Firebase RGB values and changing background color accordingly
<!DOCTYPE html>
<!--Directive-->
<html ng-app="app">
<head>
</head>
<!--Controller-->
<body ng-controller="Ctrl">
<div class="header">
<!--Style-->
<h1 ng-style="{'background-color': 'rgb(' + data.r + ',' + data.g + ',' + data.b +')'}">
Afro Circus! {{ data.r }} : {{ data.g }} : {{ data.b }}
</h1>
</div>
<!--Scripts-->
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.0-beta.19/angular.min.js"></script>
<script src="https://cdn.firebase.com/libs/angularfire/0.8.2/angularfire.min.js"></script>
<script src="/index.js"></script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment