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!
As a rig you could put all of your buttons in templates in the parent component's content and then iterate through all the templates to display them as content.
App.component.html
Parent.component.ts
Parent.component.html
A better solution (that isn't exactly what you asked for) would be to pass a single template for your buttons and then an array with button content. In the example I pass an array of strings, but it certainly can be whole objects.
App.component.html
Parent.component.ts
Parent.component.html