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
Another approach is using regex , as show below , you can use the empty regex pattern and achieve the same using ng-pattern
HTML :
Please enter! great!
Controller:@formController :
var App = angular.module('app', []); App.controller('formController', function ($scope) { $scope.mypattern = /^\s*$/g; });