I have to used browser animations module in my angular library because of my date picker and I am using lazy loading so I got several modules in my project when I want import my library in my modules I get this common error "Lazy Loading BrowserModule has already been loaded". is there any way to fix it? thanks a lot
Asked
Active
Viewed 1,132 times
0
-
`BrowserAnimationsModule` should be imported by the application (not the library) in its root module. (see [docs](https://angular.io/guide/animations#step-1-enabling-the-animations-module)) – JSON Derulo May 30 '21 at 07:20
-
Does this answer your question? [Lazy Loading BrowserModule has already been loaded](https://stackoverflow.com/questions/45975675/lazy-loading-browsermodule-has-already-been-loaded) – JSON Derulo May 30 '21 at 07:38
1 Answers
0
try to add :
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
@NgModule({
imports: [
BrowserAnimationsModule
],
declarations: [ ],
bootstrap: [ ]
})
in your appModule and remove the import of BrowserAnimationsModule from anywhere else.

anown.dev
- 204
- 2
- 10