0

In Angular v6, I am using the Angular Material table component. In my unit test, I've already added

import { MatPaginator, MatTableDataSource, MatDialogModule } from '@angular/material';

and

imports: [ MatDialogModule ]

But I'm getting this error:

Failed: Can't resolve all parameters for MatTableDataSource: (?).

Error: Can't resolve all parameters for MatTableDataSource: (?).
  ...
1
  • Could you attach your testing file?
    – Edric
    Sep 8, 2018 at 13:38

1 Answer 1

0

Include the following import in your app.module.ts, It will work

import { MatTableModule } from '@angular/material/table'; import { MatPaginatorModule } from '@angular/material/paginator';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.