hjalmers / angular-generic-table

A generic table for Angular 2+. Generic table uses standard markup for tables ie. table, tr and td elements etc. and has support for expanding rows, global search, filters, sorting, pagination, export to CSV, column clicks, custom column rendering, custom export values.
https://hjalmers.github.io/angular-generic-table/
MIT License
105 stars 55 forks source link

Use custom component in columnComponent #318

Open mossaudi opened 3 years ago

mossaudi commented 3 years ago

`error NG8002: Can't bind to 'ngClass' since it isn't a known property of 'div'.

259 <div class="progress-bar l-bg-cyan" [ngClass]="'width-per-'+row.maxInVehicle*2" role="progressbar">`

`error NG8001: 'tc-rating' is not a known element:

  1. If 'tc-rating' is an Angular component, then verify that it is part of this module.
  2. If 'tc-rating' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.

299 template: <tc-rating [iconsNumber]="10" [value]="row.priority" [disabled]="true" [tcFontSize]="11"></tc-rating>,`

Thanks first for this wonderful library, Is the library supports this kind of component reusability ?

hjalmers commented 2 years ago

Hi and sorry for the late reply, not sure if you got passed this but it's a bit hard to tell what caused the error with out some more info. My guess is that you haven't added the tc component as an entry component in this case. I've been pretty busy lately but I hope to release a new reworked version in a not to distant future. It's available as an RC (release candidate at the moment) and it will add some more flexibility to the table and allow you to define different templates that you want to use when rendering columns.