Ajout prenom page d'accueil
This commit is contained in:
parent
7aa95ef99a
commit
6de3e4dfda
|
@ -1,2 +1 @@
|
|||
<h1>Hello :D</h1>
|
||||
|
||||
<h1 style = "text-align: center;">Hello {{userName}} !</h1>
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#demotext {
|
||||
color: #FFFFFF;
|
||||
background: #912C22;
|
||||
text-shadow: 0 0 10px #FFFFFF;
|
||||
color: #FFFFFF;
|
||||
background: #912C22;
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
import { Component, OnInit } from '@angular/core';
|
||||
import { ApiBackService } from 'src/app/services/api-back.service';
|
||||
import { TokenService } from 'src/app/services/token.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home-page',
|
||||
|
@ -8,15 +9,24 @@ import { ApiBackService } from 'src/app/services/api-back.service';
|
|||
})
|
||||
export class HomePageComponent implements OnInit {
|
||||
|
||||
public userName : any;
|
||||
|
||||
constructor(private apiBackService : ApiBackService) {
|
||||
constructor(private apiBackService : ApiBackService, private tokenService : TokenService) {
|
||||
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.apiBackService.getPersonneById(this.tokenService.getCurrentUserId()).subscribe(
|
||||
user =>{
|
||||
|
||||
this.userName = user.prenom;
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
onEventLike(isLiked : boolean) {
|
||||
this.apiBackService.restoLiked$.next(isLiked);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
export interface User {
|
||||
export interface User {
|
||||
id?:number;
|
||||
firstName: string;
|
||||
prenom: string;
|
||||
lastName: string;
|
||||
email: string;
|
||||
password?: string;
|
||||
|
|
|
@ -81,7 +81,6 @@ export class RestoPageComponent implements OnInit {
|
|||
|
||||
|
||||
if(listRestauIdLike.includes(restau.id))
|
||||
|
||||
//console.log(restau);
|
||||
restau.restauLike = true;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue