How can I check if a given input control is empty? I know there is $pristine property on the field which tells that if a given field is empty initially but what
$pristine
Quite simple:
Please enter something! Good boy!
You could also use ng-hide="somefield.length" instead of ng-show="!somefield.length" if that reads more naturally for you.
ng-hide="somefield.length"
ng-show="!somefield.length"
A better alternative might be to really take advantage of the form abilities of Angular:
Updated Plnkr here.