Multiple Websocket Angularjs services Send rxjs array from one to other

In controller:

$scope.logs = [
      {
        name: '',
        data: []
      },...
];

This data is put there by nodejs websocket server when file in directory changes using callback function. I want to rxjs this to another websocket connection

socket.on(log.name, function(data){
    var observable = Rx.Observable.interval(1000).take(log.data.length).map(t => log.data[t]);
    observable.subscribe(t => {
        Device.Send(.data..);
});
      }

But the array data changes when the callback function is run, since it is a static log I can store an index of which value last was sent to the second service. Any ideas of how to best broadcast an array filled asynchronously by 1 websocket connection to another?

Second Service in Angularjs

.service('Device', function ($rootScope, $websocket) {
var ws = $websocket('ws://localhost:9000/greeter/');

ws.onOpen(function() {
    ws.send('Hello World');
  });

ws.onMessage(function(message) {
    //console.log('message: ', message);
ws.send('');
var res;
    try {
      res = JSON.parse(event.data);
    } catch(e) {
      res = {'username': 'anonymous', 'message': event.data};
    }
        $rootScope.$apply();
});

this.send = function (message) {//tie to Send button
        if (angular.isString(message)) {
        ws.send(message);
      }
    };
})

Source: AngularJS