Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Commit 8eeb729

Browse files
committed
fix(angular-ui): make header profile more dynamic
1 parent 9850b95 commit 8eeb729

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

apps/demo/src/app/app.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,8 @@ const headerMenu = [
128128
]
129129

130130
const user = {
131-
name: 'Jane',
132-
surname: 'Pearson',
131+
name: 'Jane Pearson',
132+
description: 'Administrator',
133133
avatar: 'assets/faces/female/25.jpg',
134134
}
135135

libs/angular-ui/src/components/header-profile/header-profile.component.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ import { Component, Input } from '@angular/core'
55
template: `
66
<div class="dropdown" dropdown *ngIf="profile">
77
<a class="nav-link pr-0" data-toggle="dropdown" dropdownToggle>
8-
<ui-avatar [image]="profile.avatar"></ui-avatar>
8+
<ui-avatar [image]="profile.avatar" [text]="profile.avatarText"></ui-avatar>
99
<span class="ml-2 d-none d-lg-block">
10-
<span class="text-default">{{ profile.name }} {{ profile.surname }}</span>
11-
<small class="text-muted d-block mt-1">Administrator</small>
10+
<span class="text-default">{{ profile.name }}</span>
11+
<small class="text-muted d-block mt-1">
12+
{{ profile.description }}
13+
</small>
1214
</span>
1315
</a>
1416

0 commit comments

Comments
 (0)