Comunicación con backend. Permite cargar un usuario de la BD

This commit is contained in:
2021-03-16 10:23:46 +01:00
parent f1bf8ff75e
commit 36426bc643
3 changed files with 12 additions and 9 deletions

View File

@@ -20,12 +20,12 @@ export class LoginPage implements OnInit {
this.user = this.loginService.user;
}
async login() {
login() {
this.username = (<HTMLInputElement>document.getElementById("username")).value;
this.password = (<HTMLInputElement>document.getElementById("password")).value;
this.user = await this.loginService.validateUser(this.username, this.password);
console.log(this.user.username);
this.loginService.validateUser(this.username, this.password)
}