diff options
Diffstat (limited to 'frontend/src/app/app.component.ts')
-rw-r--r-- | frontend/src/app/app.component.ts | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 4a0d85c8..f9bc2726 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -1,4 +1,4 @@ -import { Component, OnInit } from '@angular/core'; +import { AfterViewInit, Component, OnInit } from '@angular/core'; import { Title } from '@angular/platform-browser'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { filter, map } from 'rxjs'; @@ -11,10 +11,12 @@ import Shared from './Shared'; templateUrl: './app.component.html', styleUrls: ['./app.component.css'] }) -export class AppComponent implements OnInit { +export class AppComponent implements OnInit, AfterViewInit { constructor(private router: Router, private titleService: Title, private authService: AuthService, private signalRService: SignalRService, private http: HttpClient) { } + ngAfterViewInit(): void { + } ngOnInit() { this.router.events @@ -42,17 +44,5 @@ export class AppComponent implements OnInit { } this.signalRService.startConnection(); //this.startHttpRequest(); - - - - - } - private startHttpRequest = () => { - this.http.get('http://localhost:5283/chatHub') - .subscribe(res => { - console.log(res); - }) } - - } |