I am building an angular 4 application using cli . I have created a shared module and importing that module in my appmodule and moviemodule. I am getting a compile time error Uncaught Error: Unexpected value 'undefined' exported by the module 'SharedModule'
Could somebody tell me what the problem is I double checked the syntax. Am I missing something here
Error message
shared module
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 { }
App module
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 { }
Movie module
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 { }
Remove comma front of CommonModule
exports: [
remove this => , CommonModule
, FormsModule
, GridModule
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With