标签:
<form ng-controller="validationController" name="form1" novalidate>
<p> <input type="submit" ng-disabled="form1.$invalid">
<input type="email" name="myemail" ng-model="email" ng-minlength="10" ng-maxlength="50" required>
// 使用了 ng-show指令, color:red 在邮件是 $dirty 或 $invalid 才显示。
<span style="color:red" ng-show="form1.myemail.$dirty && form1.myemail.$invalid">
</span>
</p>
</form>
标签:
原文地址:http://www.cnblogs.com/dengzy/p/5369879.html