ng-class中是用name来寻找判断的属性么?
如:<form name="Form" ng-submit="submitForm" ng-controller="mycontroller">
<div class="form-group">
<label>用户名:</label>
<input ng-class="{'error': Form.username.$invalid && Form.username.$touched}"
class="form-control"
name="username"
ng-model="username"
ng-minlength = "4"
required
>
<div ng-if="Form.username.$invalid && Form.username.$touched">您输入的信息有误请检查</div>
</div>
</form>