-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
Bug
What is the expected behavior?
It must simply run with no errors.
What is the current behavior?
Uncaught TypeError: ctorParameters.map is not a function
is thrown at the start of the web-application which is caused by importing MatTableModule
What are the steps to reproduce?
Unfortunately I can't reproduce this issue via StackBlitz, but you can clone a repository with the minimum project that has this error, run npm i && ng serve
and see this error in your browser console at localhost:4200
.
What is the use-case or motivation for changing an existing behavior?
My project doesn't run with this bug.
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular: 7.0.3
Material: 7.0.3
OS: Ubuntu 18.04.1 LTS
TypeScript: 3.1.6
Is there anything else we should know?
This error happens ONLY when importing MatTableModule. Other modules, like MatCardModule
or MatMenuModule
work well.
If you inspect the issue via Chrome's debugger you will see that ctorParameters
is not an array but a function originated from table.js
file (see attached gif for more info). These answers from stackoverflow for an analogous issue don't save the day as they propose just to update my dependencies, but they are all up to date. I stumbled whith this issue in my big project, copied it to new directory and localized the bug ad pushed it on github, however, when I create new angluar application via ng new app
and add material to it via ng add @angular/material
everything works fine, so what am I doing wrong here.
Please, see a repository with the minimum project that has this error for more info.