components: Unexpected value 'MdPaginatorModule [..] Please add a @NgModule annotation

Bug, feature request, or proposal:

Bug

What is the expected behavior?

It should build

What is the current behavior?

I get an error:

Error: Unexpected value ‘MdPaginatorModule in /node_modules/@angular/material/typings/index.d.ts’ imported by the module ‘AppModule in /src/app/app.module.ts’. Please add a @NgModule annotation.

What are the steps to reproduce?

import { MdPaginatorModule } from '@angular/material';

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

@angular/cdk”: “^2.0.0-beta.10”, “@angular/common”: “4.1.0”, “@angular/material”: “^2.0.0-beta.10”,

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (2 by maintainers)

Most upvoted comments

Hello @bkcsfi, remove MatTableDataSource and MatTable from the import of @NgModule. Because in the MatTableModule they are already declared. Just import them into your component to use them.

@nooballday you have to import MatTableModule from @angular/material to @NgModule.