Headless CMS and Content Managment Hub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

34 lines
770 B

/*
* Squidex Headless CMS
*
* @license
* Copyright (c) Sebastian Stehle. All rights reserved
*/
import * as Ng2 from '@angular/core';
import * as Ng2Router from '@angular/router';
import { AuthService } from 'shared';
@Ng2.Component({
selector: 'logout',
template: ''
})
export class LogoutPageComponent implements Ng2.OnInit {
constructor(
private readonly auth: AuthService,
private readonly router: Ng2Router.Router
) {
}
public ngOnInit() {
this.auth.logoutRedirectComplete().subscribe(
() => {
this.router.navigate(['/'], { replaceUrl: true });
},
() => {
this.router.navigate(['/'], { replaceUrl: true });
}
);
}
}