voryx/angular-wamp

$wamp.connection does not get updated

Closed this issue · 2 comments

Is use something like

app.controller('ConnectionMessageCtrl', [
    '$wamp',
    function($wamp) {
      this.connectionEstablished = $wamp.connection.isConnected;
    }

After opening the connection the value connectionEstablished is true but if I cut off my network Angular does not update this value here. I only get a closing message on the console (see line 246 in the source file). It would be nice that the digest cycle is invoked even on close events.

$wamp.connection just exposes the the wrapped autobahn connection, so I have no control over it. I would think that you can just add it to your scope and set a watch on it.

Ok, thanks.