Lazy Loading BrowserModule has already been loaded

后端 未结 8 1876
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-30 08:16

I am trying to implement lazy loading but getting error as following **

ERROR Error: Uncaught (in promise): Error: BrowserModule has already been loaded.

8条回答
  •  温柔的废话
    2020-11-30 08:55

    In my case I had shared module which was importing BrowserAnimationModule. I was importing shared module in my root module. to solve this error remove all imports of BrowserAnimationModule from all modules and add it to root module.

    imports: [
        AppRoutingModule,
        SharedModule,
        BrowserAnimationsModule
      ],
    

提交回复
热议问题