This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Description
The ngMessages directive gets into an invalid state and throws an exception when there are duplicate ngMessage child keys specified. For example:
<div ng-messages="form.id.$error">
<div ng-message="required">
User ID is required.
</div>
<div ng-message="required">
User ID is required.
</div>
</div>
The issue seems to be a bug in the re-ordering logic in registerMessage which is attempting to preserve the ordering from an included template, but in this scenario inserts null into messages.
Test case here: http://plnkr.co/edit/7u4oFTGbeLqa1tmfMNlJ (look at the console log).