Reputation: 41
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.
After upgrade from Angular
5 to 7, I got this error. please help me out of this issue
Upvotes: 1
Views: 286
Reputation: 41
Fixed By Myself
Global and Local project ng version entirly different.After uninstall global ng version ,the problem was solved.During conflict time i having more than one webpack list .after remove that webpack it working fine
Upvotes: 0
Reputation: 7156
Import below
modules
only once in theroot module (app.module.ts)
:
BrowserModule
BrowserAnimationsModule
HttpModule
HttpClientModule
Upvotes: 1