Q:

Unexpected module 'BrowserAnimationsModule' declared by the module 'AppModule'. Please add a @Pipe/@Directive/@Component annotation

This is my app.module i try to complete whole instructions in material.angular.io 
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';

import { AppComponent } from './app.component';
import { BrandComponent } from './brand/brand.component';
import { AlertModule } from 'ngx-bootstrap';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatButtonModule, MatCheckboxModule} from '@angular/material';
import 'hammerjs';

@NgModule({
  declarations: [
    AppComponent,
    BrandComponent,
    BrowserAnimationsModule,
    MatButtonModule,
    MatCheckboxModule
  ],
  imports: [
    BrowserModule,
    AlertModule.forRoot(),
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

What i should do handle this error

A:

Move your Modules to your imports Array, declarations are for declaring your components
    imports: [
    BrowserAnimationsModule,
    MatButtonModule,
    MatCheckboxModule
    BrowserModule,
    AlertModule.forRoot(),
  ],

