You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(ngMessages): ensure that the ngMessagesInclude element is persisted in
the DOM
NgRepeat and any other directives that alter the DOM structure using
transclusion may cause ngMessagesInclude to behave in an unpredictable
manner. This fix ensures that the element containing the
ngMessagesInclude directive is persisted in the DOM and its downloaded
template code will be placed inside of that element. Despite there now being
an extra child container within the ngMessages element, the selection
process of finding the next message to display still works in the same
way.
BREAKING CHANGE:
From here on the ngMessageInclude directive will be persisted in the dom
alongside any adjacent ngMessage elements. The interior ngMessage
elements present within the ngMessageInclude template will be stored as
child elements. The reasoning for this is to avoid any collision with
ngRepeat or any other directive elements that may cause problems with
inherited controllers, scopes and transclusion.
This patch shouldn't have any effect on your JavaScript code, however
when it comes to animations and CSS styling please note that the
structure of DOM child elements is different.
```html
<!-- before (1.4.0-beta.5 and lower) -->
<div ng-message="val">
<div ng-message="error1">...</div>
<!-- ng-messages-include="aAndB.html" put this in here -->
<div ng-message="errorA">...</div>
<div ng-message="errorB">...</div>
<div ng-message="error10">...</div>
<div>
<!-- now -->
<div ng-message="val">
<div ng-message="error1">...</div>
<!-- ng-messages-include="aAndB.html" put this in here -->
<div ng-messages-include="aAndB.html">
<div ng-message="errorA">...</div>
<div ng-message="errorB">...</div>
</div>
<div ng-message="error10">...</div>
<div>
```
Closesangular#11196
0 commit comments