Enhance tutorial management with user-specific features and improve error handling
This commit is contained in:
@@ -141,8 +141,10 @@ export class MainComponent implements OnInit{
|
||||
this.storageService.clean();
|
||||
|
||||
//window.location.reload();
|
||||
this.router.navigate([environment.default_page]);
|
||||
window.location.reload();
|
||||
this.router.navigate([environment.default_page]).then(() => {
|
||||
window.location.reload();
|
||||
});
|
||||
//window.location.reload();
|
||||
},
|
||||
error: err => {
|
||||
console.log(err);
|
||||
@@ -175,7 +177,7 @@ export class MainComponent implements OnInit{
|
||||
this.authService.login(this.dialogLoginData.username, this.dialogLoginData.password).subscribe(
|
||||
data => {
|
||||
|
||||
//this.storageService.saveToken(data.token);
|
||||
|
||||
this.storageService.saveUser(data);
|
||||
|
||||
this.isLoggedIn = true;
|
||||
@@ -191,8 +193,7 @@ export class MainComponent implements OnInit{
|
||||
}
|
||||
);
|
||||
|
||||
// do something here with the data
|
||||
dialogSubmitSubscription.unsubscribe();
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user