devyumao / angular2-busy

Show busy/loading indicators on any promise, or on any Observable's subscription.
http://devyumao.github.io/angular2-busy/demo/asset/
MIT License
314 stars 102 forks source link

Version 1.0.3+ totally broken in Angular 4 app #46

Closed Sky4CE closed 7 years ago

Sky4CE commented 7 years ago

Please fix

image

Should I say that BrowserModule declared only once in app.module? obviously. angular2-busy was declared in shared module, so it can be used in any. Everything was perfect on v1.0.2

devyumao commented 7 years ago

The latest version is 2.0.1. You may try to update it.

npm install --save angular2-busy@latest
vjangari commented 7 years ago

I am using busy module in shared module and getting same error. (BrowserModule has been already loaded). I am using angular 4.0.1 and angular2-busy latest version

vjangari commented 7 years ago

It seems we have issue with Lazy loaded modules. I have 2 lazy loaded modules and each module required this busy module. I am getting error BrowserModule has been already loaded when I load lazy module.

BrowserAnimationsModule internally importing Browser module.

class BrowserAnimationsModule { }

@NgModule({ imports: [BrowserModule], providers: BROWSER_ANIMATIONS_PROVIDERS, })

vjangari commented 7 years ago

I guess i found solution. We should import BrowserAnimationsModule at root module ( AppModule) and busy module should not import BrowserAnimationModule as it is imported in Root module

devyumao commented 7 years ago

Thanks, @vjangari , you are right! The bug has been fixed on v2.0.2.

Sky4CE commented 7 years ago

@devyumao thanks for fix, have you pushed it to npm?

vjangari commented 7 years ago

You are welcome. You may need to update read me file to include browser animation module in root module

Sent from my iPhone

On Apr 5, 2017, at 9:48 AM, devyumao notifications@github.com wrote:

Thanks, @vjangari , you are right! The bug has been fixed on v2.0.2.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

devyumao commented 7 years ago

@Sky4CE Yes! NPM has the latest version 2.0.3.