Angular: Inputs

HTML

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.min.js"></script>
<form name="myForm">
  <input type="number" ng-model="value" min="0" name="value" placeholder="All Columns" ng-change="nullify(value)"/>
</form>

CSS

.ng-invalid {
    border-color: red;
}

.ng-valid {
    border-color: green;
}

.ng-dirty {
    border-style: solid;
    border-width: 2px;
}

.ng-pristine {
    border-style: solid;
    border-width: 1px;
}

.errors {
    color: red;
}

JavaScript

function Main($scope) {
  $scope.regexp = /^angular(js)?$/;
  $scope.nullify = function(value){
  if(value==0){
  	$scope.value = null;
  }
  }
  
}