I've read this isn't supported yet, but I was wondering if anyone has figured out a hacky workaround for this issue.
What I currently have is a parent component that has this template:
<dxi-item location='after' class="osii-item-content">
<span><ng-content select="[osii-page-button]"></ng-content></span>
</dxi-item>
Which is creating the following:
<dxi-item location='after' class="osii-item-content">
<button> // first button returned by ng-content </button>
<button> // second button returned by ng-content </button>
<button> // third button returned by ng-content </button>
</dxi-item>
But what I would like it to do, is to net the following html:
<dxi-item location='after' class="osii-item-content">
<button> // first button returned by ng-content </button>
</dxi-item>
<dxi-item location='after' class="osii-item-content">
<button> // second button returned by ng-content </button>
</dxi-item>
<dxi-item location='after' class="osii-item-content">
<button> // third button returned by ng-content </button>
</dxi-item>
Is there any known workaround for this issue?
Thanks!
I guess what you're looking for is something like this:
<ng-container *ngFor="let item of items"> <your-compo></your-compo> </ng-container>So you iterate over the items and generates required components. Don't be worried, ng-container won't be rendered, only your components will be.