We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3ae2d37 commit 3aa6c40Copy full SHA for 3aa6c40
src/app/pages/home/home.component.html
@@ -1,2 +1,4 @@
1
-<h1 *ngIf="authSvc.user$ | async">Welcome, user</h1>
2
-<p>home works!</p>
+<h1 *ngIf="(authSvc.user$ | async) as user">
+ Welcome, {{ user?.username || 'User' }}.
3
+</h1>
4
+<p>home works!</p>
src/app/shared/models/user.interface.ts
@@ -5,7 +5,7 @@ export interface User {
5
password: string;
6
}
7
8
-export interface UserResponse {
+export interface UserResponse extends User {
9
message: string;
10
token: string;
11
userId: number;
0 commit comments