Created
February 21, 2017 14:47
-
-
Save paulfelce/4f718a396e931e5ca2d13ac10656fe49 to your computer and use it in GitHub Desktop.
Treasure Hunt Dash
This file contains 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
<!--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> | |
This file contains 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
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 |
This file contains 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
<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