Skip to content

Instantly share code, notes, and snippets.

@paulfelce
Created February 21, 2017 14:47
Show Gist options
  • Save paulfelce/4f718a396e931e5ca2d13ac10656fe49 to your computer and use it in GitHub Desktop.
Save paulfelce/4f718a396e931e5ca2d13ac10656fe49 to your computer and use it in GitHub Desktop.
Treasure Hunt Dash
<!--Shows us accessing firebaseArray and filtering-->
<!--Angular makes this crazily simple-->
<div ng-app="treasurehuntApp" ng-controller="clueController as imageCtrl ">
<ul ng-repeat = "clue in clues">
<div>{{clue.data}}</div>
<div><img width="800px" height="600px" src="{{clue.img}}">
</ul>
<div>
</div>
var app = angular.module("treasurehuntApp",["firebase"])
app.controller("clueController" , function($scope , $firebaseArray)
{
$scope.clues = $firebaseArray(new Firebase( "https://blinding-fire-6477.firebaseio.com/th"));
}
);//end app.controller
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.9/angular.min.js"></script>
<script src="//cdn.firebase.com/js/client/2.2.4/firebase.js"></script>
<script src="//cdn.firebase.com/libs/angularfire/1.1.4/angularfire.min.js"></script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment