This commit is contained in:
tiago.kayaya
2021-07-30 16:35:59 +01:00
parent be465dc952
commit 818abd2941
2 changed files with 8 additions and 5 deletions
+8 -4
View File
@@ -3,6 +3,7 @@ import { Router } from '@angular/router';
import { AnimationController, ModalController } from '@ionic/angular';
import { User } from 'src/app/models/user.model';
import { AuthService } from 'src/app/services/auth.service';
import { ToastService } from 'src/app/services/toast.service';
import { FingerprintPage } from 'src/app/shared/fingerprint/fingerprint.page';
import { PinPage } from 'src/app/shared/pin/pin.page';
import { LocalstoreService } from 'src/app/store/localstore.service';
@@ -22,7 +23,8 @@ export class ProfilePage implements OnInit {
private authService: AuthService,
private animationController: AnimationController,
private router: Router,
private localstoreService: LocalstoreService
private localstoreService: LocalstoreService,
private toastService: ToastService,
) {
this.loggeduser = authService.ValidatedUser;
@@ -41,14 +43,16 @@ export class ProfilePage implements OnInit {
notImplemented(){}
logout() {
alert('LOGOUT')
const loader = this.toastService.loading();
// clear local storage
window.localStorage.clear();
setTimeout(()=>{
window.location.pathname = '/'
window.location.pathname = '/';
location.reload();
}, 1000)
this.router.navigate(['/']);
}, 1000);
loader.remove();
}