Edit in JSRUN

console 命令行工具 X clear

                    
>
console
<form ng-app="" name="myForm">
  输入你的名字:
  <input name="myAddress" ng-model="text" required>
</form>
input.ng-empty {
  background: #F00;
}

input.ng-not-empty {
  background: #F0F;
}

input.ng-touched {
  background: #0FF;
}

input.ng-untouched {
  background: #0FF;
}

input.ng-valid {
  background: #F0F;
}

input.ng-invalid {
  background: #05F;
}

input.ng-dirty {
  background: #F3F;
}

input.ng-pending {
  background: #F4F;
}

input.ng-pristine {
  background: #0FF;
}