Angular 2 : No NgModule metadata found

后端 未结 28 1476
盖世英雄少女心
盖世英雄少女心 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 05:48

    This error says necessary data for your module can't be found. In my case i missed an @ symbol in start of NgModule.

    Correct NgModule definition:

     @NgModule ({ 
        ... 
     })
     export class AppModule {
    
     }
    

    My case (Wrong case) :

    NgModule ({ // => this line must starts with @
       ... 
    })
    export class AppModule {
    
    }
    

提交回复
热议问题