Leaking logic in controllers is not an option, filters are a way to refactor your code and are compatible with ng-if and ng-show