diff options
author | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-04-13 00:59:38 +0200 |
---|---|---|
committer | Ognjen Cirkovic <ciraboxkg@gmail.com> | 2022-04-13 00:59:38 +0200 |
commit | da36bf6c2238b182c2340fb46a3f54aabe40528c (patch) | |
tree | 8e8f55c04a9832f7c5f7e8eb376dbd5eaaab4f3d /frontend/src/app/app.component.ts | |
parent | 597e7f19c5ee92a4161a2b784e2dd4a8fd674cc7 (diff) | |
parent | fbcbcfe276b12d912ab9857570860410bee943c1 (diff) |
Merge branch 'SignalR-WebSocket' of http://gitlab.pmf.kg.ac.rs/igrannonica/neuronstellar into dev
# Conflicts:
# frontend/src/app/app.module.ts
Diffstat (limited to 'frontend/src/app/app.component.ts')
-rw-r--r-- | frontend/src/app/app.component.ts | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/frontend/src/app/app.component.ts b/frontend/src/app/app.component.ts index 8c6f8452..59f247ed 100644 --- a/frontend/src/app/app.component.ts +++ b/frontend/src/app/app.component.ts @@ -3,7 +3,9 @@ import { Title } from '@angular/platform-browser'; import { Router, NavigationEnd, ActivatedRoute } from '@angular/router'; import { filter, map } from 'rxjs'; import { AuthService } from './_services/auth.service'; - +import { SignalRService } from './_services/signal-r.service'; +import { HttpClient } from '@angular/common/http'; +import Shared from './Shared'; @Component({ selector: 'app-root', templateUrl: './app.component.html', @@ -11,7 +13,7 @@ import { AuthService } from './_services/auth.service'; }) export class AppComponent implements OnInit { - constructor(private router: Router, private titleService: Title,private authService:AuthService) { } + constructor(private router: Router, private titleService: Title,private authService:AuthService,private signalRService:SignalRService,private http:HttpClient) { } ngOnInit() { this.router.events @@ -38,5 +40,19 @@ export class AppComponent implements OnInit { { this.authService.addGuestToken(); } + this.signalRService.startConnection(); + //this.startHttpRequest(); + + + + + } + private startHttpRequest = () => { + this.http.get('http://localhost:5283/chatHub') + .subscribe(res => { + console.log(res); + }) } + + } |