Angular 2 : No NgModule metadata found

后端 未结 28 1473
盖世英雄少女心
盖世英雄少女心 2020-11-30 05:31

I\'m brand new to Angular 2 and attempting to follow along with a video tutorial I found. Despite following all of the steps, Angular just won\'t work; I get the following e

28条回答
  •  时光取名叫无心
    2020-11-30 06:00

    I had the same problem and couldn't solve it after reading all the above answers. Then I noticed that an extra comma in declarations was creating a problem. Removed it, problem solved.

    @NgModule({
        imports: [
            PagesRoutingModule,
            ThemeModule,
            DashboardModule,
        ],
        declarations: [
            ...PAGES_COMPONENTS,
            **,**
        ],
    })
    

提交回复
热议问题