If is_dirty(p) is a method available in your scope, you can use
ng-show="is_dirty(p)"
or
ng-hide="is_dirty(p)"
ng-show will display the element when is_dirty returns true. ng-hide will hide the element when is_dirty returns true.
ng-if is similar to ng-show, but the element will be destroyed from the dom instead of being hidden when the condition is false.