I've been exploring the idea of passing a templateRef into a component and utilizing it to render client-provided templates encapsulated within your component.
However, my objective goes beyond this.
Here's my scenario: I'm in the process of developing a table component that takes an array of items to display, along with a callback function that fetches text from the model.
While it functions smoothly, I'm limited to displaying only text within the table.
I'm aiming to achieve something akin to a react render callback, where you can define how each element should be rendered through the callback parameter. Yet, based on my research, this seems unattainable in Angular.
My goal is to empower the component by allowing users to provide a template that will be dynamically populated with data internally.
For instance, imagine wanting to display an image in the first column - I envision passing a template containing an image, with the src attribute being set inside the component based on the data stored in each item of the passed array.
Is there a way to make this vision a reality in Angular?