initial commit

- contains basic chat via websocket
- contains button to test websocket
- contains button to test rest api
This commit is contained in:
2020-07-19 22:16:23 +02:00
commit d90204d34c
51 changed files with 14772 additions and 0 deletions

31
src/app/app.component.ts Normal file
View File

@@ -0,0 +1,31 @@
import { Component } from '@angular/core';
import { SocketService } from './socket/socket.service';
import { HttpClient } from '@angular/common/http';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
title = 'rona-frontend';
onClickSocket() {
this.socketService.send('test', {'user': 'USERNAME', 'payload': 'PAYLOAD TEST'})
}
onClickApi() {
this.httpService.get('http://localhost:5005/').subscribe(response => {
console.log('REST API call returned: ', response);
});
}
/**
*
* @param socketService
* @param httpService
*/
constructor(private socketService: SocketService,
private httpService: HttpClient) { }
}