title: Angularjs $scope is not updated
body: <p>I am developing an angular-ionic-firebase application. I am struggling on an issue where I am unable to update a $scope in my html. My  must resolve {{uevent}} and update the html with the result of {{uevent}}. My html code is below.</p>
  
  <pre><code>**&lt;ion-view view-title="{{uevent}}"&gt;**
  &lt;ion-tabs class="tabs-stable tabs-icon-top"&gt;
      &lt;ion-tab title="Buddies" icon="ion-ios-people" ng-   click="showBuddies(a)"&gt;
      &lt;/ion-tab&gt;
      &lt;ion-tab title="Summary" icon="ion-navicon" ng-click="billSummary()"&gt;
      &lt;/ion-tab&gt;
  &lt;/ion-tabs&gt;
  </code></pre>
  
  <p>my angular code is below. CurrUser is a factory. I've defined an empty $scope.uevent which I am expecting to update using a value returned from a factory.</p>
  
  <pre><code>var eventid = CurrUser.getEventid();
  $scope.uevent = " ";
  
  function updateEvent(desc) {
  $scope.uevent = desc;
  console.log($scope.uevent);// I am able to see the value returned from the factory. This function is executed below in the for loop.
  };
  
  // promise that returns a value from the factory - CurrUser.
  CurrUser.getEventdesc(eventid).then(function (result) {
  var description = result;
  var desc;
  for (var itemID in description) {
  var tmp = description[itemID];
  desc = tmp.Description; // This contains the value that must be updated to $scope.uevent
  updateEvent(desc); // Calls the function defined above to update $scope.uevent.
  };
  });
  </code></pre>
  
  <p>I've been on this since last night without any clues. Any help is greatly appreciated and as always, thanks for your time.</p>
  
  <p>UPDATE #1:(07 July)
  When i added a timeout of 1 sec, the view was updated to the correct value.</p>
  
  <pre><code>function updateEvent(desc) {
  $timeout(function(){
      $scope.$apply(function () { 
          $scope.uevent = desc;
          })
      },1000);
      };
  </code></pre>
  
  <p>Regards,</p>