aboutsummaryrefslogtreecommitdiff
path: root/frontend/src/app/_modals/login-modal/login-modal.component.ts
diff options
context:
space:
mode:
authorSonja Galovic <galovicsonja@gmail.com>2022-04-04 00:40:39 +0200
committerSonja Galovic <galovicsonja@gmail.com>2022-04-04 00:40:39 +0200
commit5beed95078c5eec21113c9b5fede1c167e653a5e (patch)
tree4599a3e68536a8d9afd7dc45fec06a37ccd14788 /frontend/src/app/_modals/login-modal/login-modal.component.ts
parent94dcb65454e55caafa0a6e36e5766144cfb204c6 (diff)
Odradjen prikaz svih obavestenja korisniku u okviru aplikacije. (umesto alerta ide mat-dialog)
Diffstat (limited to 'frontend/src/app/_modals/login-modal/login-modal.component.ts')
-rw-r--r--frontend/src/app/_modals/login-modal/login-modal.component.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/src/app/_modals/login-modal/login-modal.component.ts b/frontend/src/app/_modals/login-modal/login-modal.component.ts
index c86c269a..e1535a25 100644
--- a/frontend/src/app/_modals/login-modal/login-modal.component.ts
+++ b/frontend/src/app/_modals/login-modal/login-modal.component.ts
@@ -4,6 +4,7 @@ import { CookieService } from 'ngx-cookie-service';
import { AuthService } from 'src/app/_services/auth.service';
import { UserInfoService } from 'src/app/_services/user-info.service';
import shared from '../../Shared';
+import {AfterViewInit, ElementRef} from '@angular/core';
@Component({
selector: 'app-login-modal',
@@ -12,6 +13,8 @@ import shared from '../../Shared';
})
export class LoginModalComponent implements OnInit {
+ @ViewChild('closeButton') closeButton?: ElementRef;
+
username: string = '';
password: string = '';
@@ -38,7 +41,7 @@ export class LoginModalComponent implements OnInit {
}
else {
this.authService.authenticate(response);
- (<HTMLSelectElement>document.getElementById('closeButton')).click();
+ (<HTMLSelectElement>this.closeButton?.nativeElement).click();
this.userInfoService.getUserInfo().subscribe((response) => {
shared.photoId = response.photoId;
});