angular – 错误:模块导出的意外值’undefined’

前端之家收集整理的这篇文章主要介绍了angular – 错误:模块导出的意外值’undefined’前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在使用cli构建一个角度4应用程序.我已经创建了一个共享模块并在我的appmodule和moviemodule中导入了该模块.我收到编译时错误未捕获错误:模块’SharedModule’导出的意外值’undefined’

有人能告诉我问题是什么我仔细检查了语法.我在这里错过了一些东西

错误信息

共享模块

import { NgModule }            from '@angular/core';
import { CommonModule }        from '@angular/common';
import { FormsModule }         from '@angular/forms';
import { GridModule } from '@progress/kendo-angular-grid';


@NgModule({
  imports:      [ CommonModule,GridModule ],exports:      [,CommonModule,FormsModule,GridModule 
                    ]
})
export class SharedModule { }

应用模块

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {FormsModule} from '@angular/forms';
import {HttpModule} from '@angular/http'
import { AppComponent } from './app.component';
import { NavbarComponent } from './navbar/navbar.component';
import { TopbarComponent } from './topbar/topbar.component';
import { FooterbarComponent } from './footerbar/footerbar.component';
import { MRDBGlobalConstants } from './shared/mrdb.global.constants';
import {AppRoutingModule} from './app.routing';
import {HomeComponent} from './home/home.component';
import {MovieComponent} from './movie/movie.component';
import { MRDBCommonService } from './shared/services/mrdb.common.service';
import { NotFoundComponent } from './not-found/not-found.component';
import { SharedModule } from './shared/shared.module';


@NgModule({
  declarations: [
    AppComponent,FooterbarComponent,TopbarComponent,NavbarComponent,MovieComponent,HomeComponent,NotFoundComponent  
  ],imports: [
    BrowserModule,HttpModule,SharedModule,AppRoutingModule
  ],providers: [MRDBGlobalConstants,MRDBCommonService],bootstrap: [AppComponent]
})
export class AppModule { }

电影模块

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import {MovieComponent} from './movie.component';
import { SharedModule }    from '../shared/shared.module';

@NgModule({
  imports: [
       SharedModule
  ],exports: [MovieComponent],declarations: [MovieComponent]
})
export class MovieModule { }
删除CommonModule的逗号前面
exports: [ 
 remove it =>,GridModule 
            ]

猜你在找的Angularjs相关文章