I am working with some data via Firebase, and for some reason when the value changes on the server, the scope is getting updated in my console, however the angular view is not updating.
I've tried some different approaches including wrapping the reference to the scope in a $timeout & $apply, but still no solution. I've worked with angular many times and I've never ran into this behavior before. There's only one controller in the app.
js
app.controller('someCtrl', function($scope, $timeout){
$scope.publishedItems =[];
var fbRef = firebase.database().ref('stories/' + storyId + "/correspondents").orderByChild('published').equalTo(true);
fbRef.on('value', function(snapshot) {
//update scope
$scope.publishedItems = snapshot.val();
console.log($scope.publishedItems)// this logs the correct data, however the markup is not changing
});
html
<div ng-controller="someCtrl">
<div ng-repeat="item in publishedItems">
{{item}}
</div>
</doc>
resolved
So after some debugging, it turned out I had a function running outside of the Angular app that was appending some markup to the dom which was interfering with Angulars digest cycle.
Working as expected now