change logic in view to use ng-class instead of straight expression