Is here an AngularJS equivalent for Angular ng-container?
Or should I create something myself with a transclude directive?
Example use cases:
Tables with interlaced pairs, triples etc. of cells:
<table><tr> <ng-container ng-repeat="item in items"> <td>{{ item.a }}</td> <td>{{ item.b }}</td> </ng-container> </tr></table>
There should not be additional level in the DOM tree, and instead
<td>
s should be direct children of<tr>
element.There is similar problem with HTML lists, especially the definiton list where
<dt>
/<dd>
elements should be direct children of<dl>
while they usually exist in pairs.Table-like arrangement of data with
display:grid
:<div style="display: grid; grid-template-columns: auto auto"> <ng-container ng-repeat="item in items"> <div>{{ item.a }}</div> <div>{{ item.b }}</div> </ng-container> </div>
This case is even more problematic as the container element existing in DOM tree causes the whole layout to break, as it is rendered as the cell instead of its children.