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

Busy and Router Events #88

Open figuerres opened 6 years ago

figuerres commented 6 years ago

the angular router has navigation events that can be subscribed to. this is now starting to be a common way to do the "busy" state as this will start before the new view is loaded and allows a better visual transition
also api calls that are needed on view init can now be moved to a resolver service that is called in the router logic.

this means that the pattern of doing a busy inside a component can often be removed. so it would be good if we started to have a common busy that will work with the router events. this can allow almost all busys to be removed from compnents and just have one for the application in the root / app.component level.

i am starting to see how to do this and can this busy be adapted to work with that style / pattern.