title: ng-hide is not getting updated dynamically
body: <p>I have below div element with nghide</p>
  
  <pre class="lang-html prettyprint-override"><code> &lt;div ng-hide="showdiv" class="btnshowall"&gt; 
      &lt;a class="button button-block round outline"
         style="background: transparent !important;" &gt;
        Show All
      &lt;/a&gt;
   &lt;/div&gt;
  </code></pre>
  
  
  
  <p>and controller as below</p>
  
  <pre><code>.controller('mapCtrl', ['$scope', '$stateParams','User','$cordovaGeolocation','geoFireFac','GoogleMapFac','ConnectivityMonitor','PhysioFac','User',
  function ($scope, $stateParams,User,$cordovaGeolocation,geoFireFac,GoogleMapFac,ConnectivityMonitor,PhysioFac,User) {
  
      console.log('called mapctrl');  
      GoogleMapFac.setUserLoc($scope.map);
      $scope.showdiv = User.getShowDiv();
  
  
  }])
  </code></pre>
  
  <p>and User service as </p>
  
  <pre><code>.service('User', ['ToastFac',function(ToastFac){
      return {
           showDiv : false,
          changeShowDiv : function(){
              console.log('in changeShowDiv before change '+this.showDiv);
              this.showDiv = !this.showDiv;
              console.log('in changeShowDiv after change '+this.showDiv);
  
          },
  
          getShowDiv : function(){
              return this.showDiv;
          }
  </code></pre>
  
  <p>I am invoking User.changeShowDiv() from google map's marker click event like below </p>
  
  <pre><code>google.maps.event.addListener(marker, 'click', function () {
        alert('store id '+marker.get('store_id'));
        if(User.showDiv){
            console.log('in if');
            User.changeShowDiv();
            console.log('User.showDiv '+User.showDiv);
        }
        else{
            console.log('in else');
            User.changeShowDiv();
            console.log('User.showDiv '+User.showDiv);
        }
  
  });
  </code></pre>
  
  <p>logs are coming as expected</p>
  
  <pre><code>in else
  services.js:123 in changeShowDiv before change false
  services.js:125 in changeShowDiv after change true
  services.js:218 User.showDiv true
  services.js:211 in if
  services.js:123 in changeShowDiv before change true
  services.js:125 in changeShowDiv after change false
  services.js:213 User.showDiv false
  services.js:216 in else
  services.js:123 in changeShowDiv before change false
  services.js:125 in changeShowDiv after change true
  services.js:218 User.showDiv true
  </code></pre>
  
  <p>By default, as User.showDiv variable is false, showAll button is visible. But button is not hiding &amp; coming by marker click events.</p>
  
  <p>Could someone guide me what I am missing.</p>