Angular growl模块实现问题

时间:2017-10-30 14:25:48

标签: angular

我正在学习角2 js。 我必须添加一个模块,在我的角度应用程序中显示咆哮通知我已经在我的app.module中添加了模块,但它给了我以下错误:

Uncaught Error: Unexpected value 'GrowlModule' imported by the module 'AppModule'. Please add a @NgModule annotation.
    at syntaxError (compiler.es5.js:1694)
    at compiler.es5.js:15398
    at Array.forEach (<anonymous>)

模块网址:https://www.npmjs.com/package/ng2-growl

和我的app.module.ts代码如下:

import {GrowlModule} from 'ng2-growl';
    @NgModule({
  declarations: [
    AppComponent,
    SigninComponent,
    SignupComponent,
    DashboardComponent,
    UsersComponent,
    ProductsComponent,
    HeaderComponent,
    LeftPanelComponent,
    MainPanelComponent,
    CategoriesComponent,
    AuthenticateComponent,
    PageheaderComponent,
    SubCategoriesComponent
  ],
  imports: [
    BrowserModule,
    ReactiveFormsModule,
    HttpModule,
    GrowlModule,
    RouterModule.forRoot(appRoutes),
  ],
  providers: [
  AuthService,
  CookieService,
  AuthGuard,  
  {provide: LocationStrategy, useClass: HashLocationStrategy}],  
  bootstrap: [AppComponent],
})
export class AppModule { }

0 个答案:

没有答案