Add login/logout page reloads
This commit is contained in:
parent
0a606bc51b
commit
0af31aa8b6
2 changed files with 5 additions and 3 deletions
|
@ -45,7 +45,8 @@ export class LoginComponent implements OnInit {
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result => {
|
result => {
|
||||||
this.loginStatus = 'success';
|
this.loginStatus = 'success';
|
||||||
this.router.navigate([this.returnUrl]);
|
this.router.navigate([this.returnUrl])
|
||||||
|
.then(() => { window.location.reload() });
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
console.log( error._body );
|
console.log( error._body );
|
||||||
|
|
|
@ -34,13 +34,14 @@ export class FullLayoutComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
userLogout() {
|
userLogout() {
|
||||||
console.log('logout clicked');
|
console.debug('logout clicked');
|
||||||
this.api
|
this.api
|
||||||
.logout()
|
.logout()
|
||||||
.subscribe(
|
.subscribe(
|
||||||
result => {
|
result => {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
this.router.navigate(['/login']);
|
this.router.navigate(['/login'])
|
||||||
|
.then(() => { window.location.reload() });
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue