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
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
/* scenario: using tElement.detach() in compile of a directive with terminal=true: result: compile does not interpolate first (only) following TextNode of the element directive:*/directive('terminalDirective',function(){return{terminal:true,compile: function(tElement){tElement.detach();// some other logic}}})
<h5>Disables interpolation of following adjacent TextNodes</h5><ul><ling-repeat="i in [1]"><terminal-directive>Element:{{ i }}</terminal-directive>
TextNode: {{ i }}
</li></ul><h5>Preceding textNodes are interpolated correclty</h5><ul><ling-repeat="i in [1]">
TextNode:{{ i }}
<terminal-directive>Element:{{ i }}</terminal-directive></li></ul><h5>Subsequent Elements are interpolated correclty, but not textNodes</h5><ul><ling-repeat="i in [1]">
TextNode:{{ i }}
<terminal-directive>Element:{{ i }}</terminal-directive>
TextNode:{{ i }}
<div>Element:{{ i }}</div>
TextNode:{{ i }}
<div>Element:{{ i }}</div>
TextNode:{{ i }}
</li></ul>
Possible cause: node index mismatch.
In some places compile creates a copy of childNodes so any kind of mutation does not cause the index to be out of sync.