ng-socket-io icon indicating copy to clipboard operation
ng-socket-io copied to clipboard

connect event

Open mhsystem opened this issue 6 years ago • 1 comments

hello, how can I take on connect event, when I try this, it is not emit...

this.socket.on( 'connect', function () { that.showToast("connect") } );

mhsystem avatar Mar 16 '18 16:03 mhsystem

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")
});

laharshah avatar Apr 23 '18 13:04 laharshah