Skip to content

Instantly share code, notes, and snippets.

@jochasinga jochasinga/index.html
Last active Aug 29, 2015

Embed
What would you like to do?
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
You can’t perform that action at this time.