ng-socket-io
ng-socket-io copied to clipboard
connect event
hello, how can I take on connect event, when I try this, it is not emit...
this.socket.on( 'connect', function () { that.showToast("connect") } );
Not sure if this is the case. But you suppose to use lambda function to access showTost. defined in the class.
this.socket.on( 'connect', () => {
this.showToast("connect")
});