I am fairly new to ionic and I want to create a action sheet with dynamic buttons with badges. I was successful in creating dynamic buttons, but couldn’t find a way to add badges for them.
Is there any way to add badges to Actionsheets in ionic 3?
I am fairly new to ionic and I want to create a action sheet with dynamic buttons with badges. I was successful in creating dynamic buttons, but couldn’t find a way to add badges for them.
Is there any way to add badges to Actionsheets in ionic 3?
I am not sure about Action sheets, but this is how I use badge on buttons,
<button ion-button icon-only color="primary" (click)="openNotifications()">
<ion-icon name="md-notifications-outline"></ion-icon>
<ion-badge class=button-badge>notifications.badgeCount</ion-badge>
</button>
Then position the badge using with some css
.button-badge {
position: absolute;
font-size: 1rem;
top: 0;
right: -8px;
opacity: 0.8;
}
Thank you. But after spending some more time in the docs, found out there is a better option called popover. Now working like charm.