refactor badges to use ng-if