Angular 2 : No NgModule metadata found

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

    I had the same problem but none of all those solutions worked for me. After further investigation, I found out that an undesired import was in one of my component.

    I use setTimeout function in app.component but for any reason Visual Studio added import { setTimeout } from 'timer'; where it was not needed. Removing this line fixed the issue.

    So remember to check your imports before going further. Hope it may help someone.

提交回复
热议问题