Hello,
How do I change the tab badge from inside a Tab (ion-tab)? I have a list of questions in a Tab and would like to show a badge to indicate unanswered items. I can access the badge from the Tabs container but the container has no knowledge of the data that’s inside the Tab.
Regards,
Kid
you need to bind directive.
In tabs.ts, you need to declare a variable
public myValue = 0;
//any number
and in tabs.html, you need to bind it like this
[tabBadge]="myValue"
This works only for the first time when app starts. Every time when you click on tab if the myValue had changed,
then you cannot use this.