interceptor et guards

This commit is contained in:
Blandine Bajard 2022-02-25 10:55:33 +01:00
parent f8bb12cc3a
commit 771c14e7f2
6 changed files with 73 additions and 25 deletions

View file

@ -28,7 +28,12 @@ export class SigninComponent implements OnInit {
if (email !== '' && password !== '') {
this.authService.signin(email, password).subscribe((resp) => {
console.log('Component Signin: ', resp);
this.router.navigate(['tableau-de-bord']);
//if(resp == ){
this.router.navigate(['tableau-de-bord']);
//}else{
// window.alert("Votre identifiant/mot de passe est erroné");
//}
console.log('Component Signin: ', resp);
});
} else {
// afficher une erreur à l'utilisateur