Dynamic Actions Sheet Button Texts

I am using Ionic’s Action Sheet and it works great.


My requirement is to show/hide a button text based on some scope variable. For Admin users, there should be some extra button which should not be present for normal users.

How can I do this? I could not find any existing example on this.

The action sheet will show whichever buttons you feed it, so in your controller you would create the button json data based on your business logic (admin vs non admin) and then just pass the button list to the action sheet.

Ah… now it makes sense… I am the dumbest person on the earth. :smile:

1 Like

no worries, thats what the forum is for my man!

1 Like