Skip to content

Instantly share code, notes, and snippets.

@Stronhold
Created February 10, 2019 12:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Stronhold/bf28974453c4c0b5945a2e993cca0216 to your computer and use it in GitHub Desktop.
Save Stronhold/bf28974453c4c0b5945a2e993cca0216 to your computer and use it in GitHub Desktop.
import { Component } from '@angular/core';
import { WebSocketService } from './services/web-socket.service';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
constructor(private _ws: WebSocketService) {
this._ws.connect();
}
sendMessage() {
this._ws.sendMessage();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment