其他分享
首页 > 其他分享> > BrowserModule has already been loaded. If ... angular坑

BrowserModule has already been loaded. If ... angular坑

作者:互联网

笔记

如果报错如下:

BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.
Error: BrowserModule has already been loaded. If you need access to common directives such as NgIf and NgFor from a lazy loaded module, import CommonModule instead.

 

 

确保根Module中有这3,然后其他的module 中     只需要 “CommonModule”  就行。

 

 

如果继续报错, 仔细看看 导入“imports” 的module中是否导入了“BrowserModule”。

 

标签:...,already,module,been,CommonModule,loaded,BrowserModule
来源: https://www.cnblogs.com/youlicc/p/14247642.html