src/app/layout/default/header/components/user.component.ts
File was renamed from src/app/layout/header/components/user.component.ts @@ -30,17 +30,18 @@ this.tokenService.change().subscribe((res: any) => { this.settings.setUser(res); }); // mock const token = this.tokenService.get() || { token: 'nothing', name: 'Admin', avatar: './assets/img/zorro.svg', email: 'cipchk@qq.com' email: 'admin@qq.com' }; this.tokenService.set(token); } logout() { this.tokenService.clear(); this.router.navigateByUrl('/pro/user/login'); this.router.navigateByUrl(this.tokenService.login_url); } }