diff options
Diffstat (limited to 'client/app/app.component.ts')
-rw-r--r-- | client/app/app.component.ts | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/client/app/app.component.ts b/client/app/app.component.ts index c94ff79a7..20c8c8724 100644 --- a/client/app/app.component.ts +++ b/client/app/app.component.ts | |||
@@ -51,16 +51,15 @@ import { | |||
51 | export class AppComponent { | 51 | export class AppComponent { |
52 | isLoggedIn: boolean; | 52 | isLoggedIn: boolean; |
53 | search_field: string = name; | 53 | search_field: string = name; |
54 | choices = [ ]; | 54 | choices = []; |
55 | |||
56 | constructor(private _friendService: FriendService, | ||
57 | private _authService: AuthService, | ||
58 | private _router: Router | ||
59 | 55 | ||
56 | constructor(private friendService: FriendService, | ||
57 | private authService: AuthService, | ||
58 | private router: Router | ||
60 | ) { | 59 | ) { |
61 | this.isLoggedIn = this._authService.isLoggedIn(); | 60 | this.isLoggedIn = this.authService.isLoggedIn(); |
62 | 61 | ||
63 | this._authService.loginChanged$.subscribe( | 62 | this.authService.loginChangedSource.subscribe( |
64 | status => { | 63 | status => { |
65 | if (status === AuthStatus.LoggedIn) { | 64 | if (status === AuthStatus.LoggedIn) { |
66 | this.isLoggedIn = true; | 65 | this.isLoggedIn = true; |
@@ -75,9 +74,9 @@ export class AppComponent { | |||
75 | search: search.value, | 74 | search: search.value, |
76 | field: search.field | 75 | field: search.field |
77 | }; | 76 | }; |
78 | this._router.navigate(['VideosList', params]); | 77 | this.router.navigate(['VideosList', params]); |
79 | } else { | 78 | } else { |
80 | this._router.navigate(['VideosList']); | 79 | this.router.navigate(['VideosList']); |
81 | } | 80 | } |
82 | } | 81 | } |
83 | 82 | ||
@@ -86,7 +85,7 @@ export class AppComponent { | |||
86 | } | 85 | } |
87 | 86 | ||
88 | makeFriends() { | 87 | makeFriends() { |
89 | this._friendService.makeFriends().subscribe( | 88 | this.friendService.makeFriends().subscribe( |
90 | status => { | 89 | status => { |
91 | if (status === 409) { | 90 | if (status === 409) { |
92 | alert('Already made friends!'); | 91 | alert('Already made friends!'); |
@@ -99,7 +98,7 @@ export class AppComponent { | |||
99 | } | 98 | } |
100 | 99 | ||
101 | quitFriends() { | 100 | quitFriends() { |
102 | this._friendService.quitFriends().subscribe( | 101 | this.friendService.quitFriends().subscribe( |
103 | status => { | 102 | status => { |
104 | alert('Quit friends!'); | 103 | alert('Quit friends!'); |
105 | }, | 104 | }, |