Advertisement
Guest User

Untitled

a guest
Apr 24th, 2014
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. $scope.componentStatus = syncData("components/-JI_JgHxm0TEUEVjADJn/status");
  2. console.log($scope.componentStatus);
  3.  
  4. console.log($scope.componentStatus.$value);
  5.  
  6. components : {
  7. "-JI_dFtOxE5k1ZFeZu8a" : {
  8. "experience" : "-JJ8jT0oJA3vYOeBNpq5",
  9. "name" : "Name of Component",
  10. "status" : "-JJ8hQcUb0_ip9Hoqcqq",
  11. "theme" : "-JJ8mD9tEsBw3a3g9Wz6"
  12. },
  13. }
  14.  
  15. $scope.componentStatus = syncData("components/-JI_JgHxm0TEUEVjADJn/status");
  16. $scope.componentStatus.$on('loaded', function() {
  17. console.log($scope.componentStatus.$value);
  18. });
  19.  
  20. <div>When it arrives, it will appear here: {{componentStatus.$value}}</div>
  21.  
  22. var data = syncData("components/-JI_JgHxm0TEUEVjADJn/status").then(function() {
  23. console.log(data.$value);
  24. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement