我angular加载了ngmessage模块,使用ng-messages也没有问题,但是在后面加上ng-messages-include后就报错,不知道什么原因,请求增援,谢谢!代码如下:<div>
<form name="userForm" novalidate>
<div class="form-group" ng-class="{'has-error':userForm.name.$touched && userForm.name.$invalid}">
<label>用户名</label>
<input type="text" placeholder="Name" name="name" class="form-control" ng-model="main.name" ng-minlength="5" ng-maxlength="10" required/>
<div class="help-block" ng-messages="userForm.name.$error" ng-messages-include="error-messages.html">
</div>
</div>
<pre>{{userForm.name.$error}}</pre>
<pre>{{userForm.name.$error && userForm.name.$dirty}}</pre>
</form></div>提示错误:
添加回答
举报
0/150
提交
取消