BenjaminBrandmeier / angular2-image-gallery

Image Gallery built with Angular 17+, node.js and GraphicsMagick

Home Page:https://oidamo.de/blog/gallery-demo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lazy Load this module causes 'BrowserModule has already been loaded' error

ssglopes opened this issue · comments

Lazy load this module to trigger the error. The error happens because BrowserAnimationsModule (as BrowserModule) can be included only ones in a project.
It's caused by this line: animations_1.BrowserAnimationsModule inside file angular2imagegallery.module.js
as when commented out it works and relates to:
angular/angular-cli#5684 => post: Perezmarc commented on Mar 29.

Same problem here. Lazy loading BrowserAnimationsModule or NoopAnimationsModule throws following error,
ERROR Error: Uncaught (in promise): 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. 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.

Are there any news on this side? I get the same issue as @ssglopes. What I'm doing for the moment is commenting too BrowserAnimationsModule after installing the dependency.

Please try it again now with the newest published version (6.0.0).

Still not working with 6.0.2. Any idea of when it could be fixed?