angularjs的验证信息的写法

<div ng-messages="alarmDelayForm.alarmRuleName.$error" role="alert">
<div ng-message="required" translate="message.required">This field is required</div>
<div ng-if="checkUniqueName">
<span translate="message.nameExists">This name is already exists</span>
</div>
</div>

 

可以在<ng-messages>里面嵌入一个<div ng-if="expression">

posted @ 2018-01-10 16:09  技术让世界更精彩  阅读(146)  评论(0编辑  收藏  举报