googlearchive / firebase-util

An experimental toolset for Firebase
http://firebase.github.io/firebase-util
MIT License
276 stars 67 forks source link

FireBase NormalizedCollection white screen #91

Closed masonspencer closed 8 years ago

masonspencer commented 8 years ago

I've created a FireBase normalized collection to collect and merge data for a user's conversations and the individual conversation page itself. When referencing "conversations" from the controller(inside an ng-repeat) I get a blank screen. That is, until I manipulate the DOM by dragging around. On mobile, the page stays blank.

I've stripped the ng-repeat down to:

<div ng-repeat="conversation in conversations">
      <p>{{ conversation }} </p>
</div> 

And in the controller I create the normalized collection as stated in the Firebase documents as well as copy/pasted from the generator:

var baseRef = new Firebase("https://subdomain.firebaseio.com");
var norm = new Firebase.util.NormalizedCollection(
  [baseRef.child('/profile/' + authData.uid + '/conversations'), "usersConversations"],
  baseRef.child("/conversations")
);

norm = norm.select(
  "usersConversations.$key",
  {"key":"conversations.$value","alias":"conversation"}
);

var ref = norm.ref();

ref.once('value', function(snap) {
  $scope.conversations = snap.val();
});

Does anyone have an idea why this would cause a blank page? PS: Also posted here http://stackoverflow.com/questions/36730739/firebase-normalizedcollection-white-screen .

katowulf commented 8 years ago

We monitor Stack Overflow

masonspencer commented 8 years ago

Thanks!!!