I am importing material modules as follow in app module:
import { NgModule } from '@angular/core';
import { SharedModule } from 'app/shared/shared.module';
import { AppRoutingModule } from './app-routing.module';
import {
MdTooltipModule,
MdTabsModule,
MdSlideToggleModule,
MdIconModule,
MdDialogModule,
MdButtonModule,
MdListModule,
MdCardModule,
MdToolbarModule,
MdProgressSpinnerModule,
MdProgressBarModule,
} from '@angular/material';
@NgModule({
declarations: [
//..components
],
imports: [
BrowserModule,
BrowserAnimationsModule,
MdTooltipModule,
MdTabsModule,
MdSlideToggleModule,
MdIconModule,
MdDialogModule,
MdButtonModule,
MdListModule,
MdCardModule,
MdToolbarModule,
MdProgressSpinnerModule,
MdProgressBarModule,
SharedModule,
AppRoutingModule,
],
providers: [
//..
],
bootstrap: [AppComponent]
})
export class AppModule { }
This gives an error as follow for each Md Module. I also updated my Angular CLI and Material design. I also tried to import only MaterialModule, but it is deprecated.
ERROR in Unexpected value 'MdTooltipModule in E:/Code/employee-web/node_modules/@angular/material/typings/index.d.ts' impor ted by the module 'AppModule in E:/Code/employee-web/src/app/app.module.ts'. Please add a @NgModule annotation.
How can I get rid of this?