Skip to content

Dynamic template based on column configuration #284

@Duskfall

Description

@Duskfall

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions