lei lei
lei lei

Reputation: 1829

How to add a dot on tab icon in ionic3?

I want to add a red dot on tab icon when some parameter changes. for example the global parameter isMessage, when it is true, add a red dot, otherwise not red dot.

similar like this. enter image description here

my html code is:

<ion-tabs>
  <ion-tab [root]="tab0Root" [tabTitle]="tab0Title" tabIcon="home"></ion-tab>
  <ion-tab [root]="tab1Root" [tabTitle]="tab1Title" tabIcon="message"></ion-tab>
  <ion-tab [root]="tab2Root" [tabTitle]="tab2Title" tabIcon="bluetooth"></ion-tab>
</ion-tabs>

Could you please help?

Upvotes: 0

Views: 440

Answers (1)

Ali Mhanna
Ali Mhanna

Reputation: 397

you can use ion-badge see docs here https://ionicframework.com/docs/api/badge

Upvotes: 1

Related Questions