Binding ion-tab badge to a dynamic value


I’m creating an app using the tabs layout and I’m using the ion-tab badge to show that there is a update in one of the tabs. I’m doing this by making a call to an external webservice then returning some results and storing this in local storage.

How can I bind a dynamic number to be shown in the badge? I was trying to add a value to the $scope object in my controller, which is set as the controller for the body of my application (), but that has failed.

What’s the best way I can do this?



Actually found the problem, it does work with setting a value in the controller. I was just setting it in the wrong controller.

Works well now.

1 Like

HI , Can you teach me how to ?