Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic template based on column configuration #284

Open
Duskfall opened this issue Jul 3, 2023 · 0 comments
Open

Dynamic template based on column configuration #284

Duskfall opened this issue Jul 3, 2023 · 0 comments

Comments

@Duskfall
Copy link

Duskfall commented Jul 3, 2023

I would like to ask you whether it's possible to use the data property of the PblColumn to store a consumer component reference in it, and then use that in the template to dynamically create a new instance based on that type. Even though I have declared it in the app-module or using
PblNgridModule.withCommon([ { component: MyComponentContainer} ]), it doesn't seem to pick it up

<pbl-ngrid>
<div *pblNgridCellDef="'*'; value as value; col as col;">
    <component-container-that-dynamically-creates-components-based-on-col-type [item]="value" [column]="col">
    </component-container-that-dynamically-creates-components-based-on-col-type>
  </div>
</pbl-ngrid>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant