笔记
如果报错如下:
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”。