<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">