This repository was archived by the owner on Apr 12, 2024. It is now read-only.
  
  
  
  
  
Description
If you have a custom validation key (such as server in this case), and try bind the ngMessage element to some object you presumably have the error message in, it does not work.
<div ng-if="myForm.test.$dirty" ng-messages="myForm.test.$error">
    <span ng-message="server" ng-bind="errors.test"></span>
</div>The above does not work, the span remains empty but visible and errors.test is indeed populated (and visible in scope, by trying angular.element($0).errors.test).
If you use a child, like so:
<span ng-message="server">
    <span ng-bind="errors.test"></span>
</span>This works correctly.
Is this expected functionality or a bug? I have no issue with having to use a child if it is expected to behave this way.
Example here.