uttesh / ngletteravatar

directive for the letter avatar for the given string like gmail, first letter of the given data will be the avatar .
http://uttesh.github.io/ngletteravatar/
MIT License
136 stars 36 forks source link

Colors are not being applied to alphabets #24

Open Purus opened 8 years ago

Purus commented 8 years ago

I am using the below code to have the colors for the alphabets.

<ng-letter-avatar class="pic" height="45" width="45" alphabetcolors="customColors" data="{{rangoli.userId.displayname}}" charCount="2" shape="round"></ng-letter-avatar>

But the colors are always the default one. Anything wrong here?

The color codes are below:

  $scope.customColors = ["#D93A37", "#5A8770", "#5A8770", "#5A8770", "#5A8770", "#5A8770", "#5A8770", "#5A8770", "#5C9BBC", "#F5888D",
    "#9A89B5", "#407887", "#9A89B5", "#5A8770", "#D33F33", "#A2B01F", "#F0B126", "#0087BF", "#F18636", "#0087BF", "#B2B7BB", "#72ACAE",
    "#9C8AB4", "#5A8770", "#EEB424", "#407887"
  ];
uttesh commented 8 years ago

@Purus Thanks, Its working fine, this is the code pen

Purus commented 8 years ago

I could not make it work in the ionic app. :(

uttesh commented 8 years ago

@Purus oh, I did not get any issue with a ionic app i have implemented its worked charm. ionic is just angularjs framework on codova plugin it should work, may be your device browser is having some issue check in other device.thanks

uttesh commented 8 years ago

@Purus ngletteravatar having a ionic version also which is bit old school code, not updated with latest changes that work's as well. http://uttesh.com/ionic-letteravatar/