I have a service in which values can change from outside Angular:

```
angularApp.service('WebSocketService', function() {
    var serviceAlarms = [];
    var iteration = 0;

    this.renderMessages = function(alarms, socket) {
        if (! angular.equals(serviceAlarms, alarms)) {
            serviceAlarms = alarms;
            iteration++;
        }
    };

    this.getAlarms = function () {
        return serviceAlarms;
    };
    this.iteration = function () {
        return iteration;
    };
    this.socket = initSocketIO(this);
});

```

The initSocketIO function makes callbacks to this services renderMessages() function and serviceAlarms variable gets changed on a steady basis.

Now i am trying to watch for changes in this service like so:

```
controllers.controller('overviewController', ['$scope', 'WebSocketService', function ($scope, WebSocketService) {
    $scope.$watch(
        function () {
             return WebSocketService.iteration();
        },
        function(newValue, oldValue) {
            $scope.alarms = WebSocketService.getAlarms();
        },
        true
    );
}]);

```

to no avail. The second function provided to $watch never gets executed except on controller initialization.

I have tried with and without true as third parameter.