I am trying to hide a button if a condition is satisfied. This should be very easy by using `ng-show` but for some reason I am having difficulties in implementing this.

My code is as follows:

**html**

```
<a href = "example.com" ng-click="Bookings.disableCancelFirstBooking(car)">
     <i class="red" ng-show="Bookings.disableCancellationButton">
     </i>
</a>

```

controller.js

```
this.disableCancellationButton = true;

this.disableCancelFirstBooking = function(carID){

 BookingsResource.firstBookingOfSubscription({id: carID},  $.proxy(function () {
       if(carID.status === 'waiting'){                    
            this.disableCancellationButton = false;
            console.log(this.disableCancellationButton)
            console.log('why does this not work?')
        }
    }));
}

```

and finally the service that I am implementing

```
  firstBookingOfSubscription: {
                    method: "GET",
                    url: 'example/bookings/:id/cars',
                    isArray: true
                }

```

The strange thing is that I am seeing the message `'why does this not work?'` in the console along with the `this.disableCancellationButton = false;`

any ideas why the icon is then not been hidden?

I have read through many SO posts but cannot find a relevant answer