Last active
August 29, 2015 14:07
-
-
Save jochasinga/c720677640e026381366 to your computer and use it in GitHub Desktop.
HTML + Angular displaying Firebase RGB values and changing background color accordingly
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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