The data-* attributes are taken into consideration only at initialization time. The problem here is that, when the navigation directive is initialized, the data-badge attribute is not evaluated yet. When using an ng-repeat to generate the navigation items, this initialization is postponed, until the items are rendered. In this case the data-badge attribute is evaluated. However, this also works only the first time. After the initialization if you change the badge value, it won’t be reflected out of the box on the UI.
The solution is to add a watch to the scope value you want to bind, and update the badge value like this: