Displays the first and last character avatars of the name?
vandinhabc opened this issue · 2 comments
vandinhabc commented
Displays the first and last character avatars of the name?
vandinhabc commented
i have name avatar = 'nguyen van dinh', i want display avatar : ND and i have name = 'admin', i want display 'AD'. help me? thank
HaithemMosbahi commented
I believe this is a specific transformation that you can do outside of avatar component and then just simply pass the value that you wanna display to the avatar component. e.g :
<ngx-avatar value="AD"></ngx-avatar>
<ngx-avatar [value]="adminAvatar"></ngx-avatar>
// in your component ts: adminAvatar = 'AD' or maybe a pipe that will return avatar based on the value and type,
if admin returns 'AD', if with middle name return ND, etc