Open bvkimball opened 4 years ago
@bvkimball can you share a reproduction?
Tried to make a stack blitz but the project uses a github repo as a dependency. This project will work with npm start
but NOT with npm run build && npx angular-http-server --path ./dist/ng10-bug-repo -p 4200
The implementation of our novo-data-table
that uses cdk-table
is here:
https://github.com/bullhorn/novo-elements/blob/master/projects/novo-elements/src/elements/data-table/data-table.component.ts
Our implementation is a little weird we have our own template directive that then dynamically creates all the columnDefs.
@jelbourn I know this is probably an Ivy renderer issue or something we are doing that is not compatible with Ivy but I can't even figure out how to debug this in the production build. I have tried everything short of rewriting the component, which is my next step. I just don't know what my component could be doing that could cause the CdkTable not not initialize any ideas on where to look would be helpful
I'll try to take a look during my weekly issue triage
I noticed something something strange with the *ngIf
in this component as well. Believe this issue with treeshaking was removing CommonModule and CdkTableModule for some reason. sideEffects:true
fixed this issue for me.
Not sure if it is caused by recursive components, i do get a few of those warning but not for code related to my table components.
Potentially a duplicate of https://github.com/angular/angular/issues/38362
When running
ng serve
everything worksJust upgraded to angular 10 and got everything working, finally got to running a prod build and not of my DataTables are loading. Using
ng build --prod && npx angular-http-server --path ./dist -p 3001
. It seems like the CdkTable is not instantiated because the DataSource.connect function is never called.I have a component library that has also been upgraded to angular 10 and works, the component library has a DataTable component that use
<cdk-table>
like so: (this has been working with prior versions)I added
@ViewChild('table') tableRef: CdkTable<T>;
when I console.log this i get:Environment