I am unable to update specific text from firebase with angular. I have read the firebase docs and am using .on -- The data retus in the console log when it updates and My app updates an image, but not the h1 tag which is suppose to be the integer it retus The image updates like its suppose to but the number doesn't.
Any help is greatly appreciate.
//controller
var firebaseRef = new Firebase("https://app.firebase.io/some/data);
firebaseRef.on('value', function(dataSnapshot){
var armLength = dataSnapshot.val().length;
console.log(armLength);
$scope.length = armLength;
$scope.place = dataSnapshot.val();
if (armLength > 3){
document.getElementById("arms").style.backgroundImage = 'url(img/short.png';
}
if (armLength > 6) {
document.getElementById("arms").style.backgroundImage = 'url(img/tall.png';
}
//please ignore syntax, no errors are thrown in program :)
//HTML
<div class="view">
<h1 class="FIXME">{{ place.arm }}</h1>
<p>Length</p>
</div>
<!-- This works, but doesn't update like it should-->
<div id="arms" style="background: url(img/short.png) center; background-size: cover;">
</div>
<!-- This is the image that updates properly as the data does,-->
<!--please ignore inline styles.... Why does this work, and the h1 doesn't??-->
