0

Has anyone found a way to dynamically attach icons to individual array elements on the SelectButton in primeng? My scenario is to add appropriate icons according to status something like below picture. Icons for tab

Note: I am also looking at other similar frameworks like ng-bootstrap in case if this use-case can be easily implemented.

Jibin TJ
  • 416
  • 1
  • 4
  • 15
  • Your question is a bit vague can you show an example of what you are trying to achieve ? – DollarAkshay Jan 22 '18 at 09:11
  • Use `ngIf` directive? – Zooly Jan 22 '18 at 09:32
  • ng-src is the way to go , you can also use a condition inside angular expression check documents for more info https://docs.angularjs.org/api/ng/directive/ngSrc also a previous answer https://stackoverflow.com/questions/13999659/conditionally-change-img-src-based-on-model-data – Panos K Jan 22 '18 at 09:33
  • You can't set icon on a `selectButton`. Do you mean `splitButton` ? – Antikhippe Jan 22 '18 at 10:04
  • Sorry,I forgot to mention primeng. I am using primeng components. – Jibin TJ Jan 22 '18 at 17:15

1 Answers1

1

Finally the Primeng team accepted my enhancement request and implemented this feature here

Jibin TJ
  • 416
  • 1
  • 4
  • 15