'I can't get details from a client he gives me [object Object] using angular and firebase
I am a beginner in angular firebase, I followed a training, angular firebase, I want details of a client, but it gives me in the client console: [object Object].
list-clients.component.html
<tr *ngFor="let client of clients">
<td class="text-right">
<a routerLink="/client/{{ client.id }}" class="btn btn-info "><i class="fa fa-info-circle"></i></a>
</td>
</tr>
client.service.ts
getClient(id:string){
return this.clientsCollection.doc(id).valueChanges();
}
details-client.component.ts
ngOnInit(): void {
this.id = this.route.snapshot.params['id'];
this.clientService.getClient(this.id).subscribe((client:any) => {
this.client = client;
console.log("client est : " + this.client);
});
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
