snics/ng2-avatar

change background dynamically

jacobbutton opened this issue · 1 comments

Anyway to add the ability to update the background color, like after an a sync call to pull an object from the database that's storing a color attribute?

snics commented

Hi jacobbutton,

you can set an own background like this:

 <avatar [email]="email" [displayType]="'circle'" background="#000000"></avatar>

or your set dynamically over an input data binding like this:

 <avatar [email]="email" [displayType]="'circle'" (background)="colorHandler()"></avatar>

Could I answer your question?