angular2-image-gallery icon indicating copy to clipboard operation
angular2-image-gallery copied to clipboard

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

Open ssglopes opened this issue 8 years ago • 4 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: https://github.com/angular/angular-cli/issues/5684 => post: Perezmarc commented on Mar 29.

ssglopes avatar May 07 '17 20:05 ssglopes

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.

karthik04 avatar Jul 10 '17 06:07 karthik04

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.

johndi9 avatar Oct 20 '17 08:10 johndi9

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

BenjaminBrandmeier avatar Jun 17 '18 09:06 BenjaminBrandmeier

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

karimzg avatar Jul 13 '18 15:07 karimzg