angular - Unexpected value 'DecoratorFactory' imported by the module 'TempModule' -


in sample application have written feature module "tempmodule" , below code.

import { ngmodule } '@angular/core'; import { commonmodule} '@angular/common';  import { temponecomponent } './temp.one.component'; import { temptwocomponent } './temp.two.component'; import { temprouting } './temp.routing';    @ngmodule({ declarations: [ temponecomponent,                 temptwocomponent], imports: [ ngmodule,            commonmodule,            temprouting] })  export class tempmodule {} 

i referring tempmodule in root module , below root module code

import { ngmodule }       '@angular/core'; import { browsermodule  } '@angular/platform-browser'; import { formsmodule } '@angular/forms';  //-- routing import import { routing,          approutingproviders} './app.routing';   //-- root component import import { appcomponent } './app.component'; import { appaboutcomponent } './app-about.component'; import { appcreatticketcomponent } './tickets/    app.create-ticket.component'; import { appopenticketcomponent } './tickets/app.open-ticket.component'; import { appsearchticketcomponent } './tickets/    app.search-ticket.component'; import { appdashboardcomponent } './tickets/app.dashboard.component'; import { appuserscomponent } './users/app.users.component';  import { tempmodule } './tempmodule/temp.module';  @ngmodule({     declarations: [appcomponent ,      appaboutcomponent ,      appcreatticketcomponent,     appopenticketcomponent,     appsearchticketcomponent,     appdashboardcomponent,     appuserscomponent     ],     imports:       [browsermodule ,                     formsmodule ,                     routing,                     tempmodule ],     providers: [approutingproviders],     bootstrap:    [appcomponent]  })  export class appmodule {} 

when run application , "unexpected value 'decoratorfactory' imported module 'tempmodule'" displayed in browser console.

any idea reason error ?

you're trying import decorator in imports array. should contain modules

@ngmodule({   declarations: [ temponecomponent,                 temptwocomponent],   imports: [ ngmodule, <== why here???            commonmodule,            temprouting] })  export class tempmodule {} 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -