![]() ![]() If () returned a promise (or subscription), we could also pass it to () and achieve similar results. When the observable returned from () emits for the first time, IsLoadingService will know that this observable has stopped loading and update the "page loading" indicator as appropriate. When this component is initialized, ( () ) will be called triggering the "page loading" indicator we set up previously. Seperately (as mentioned before), when IsLoadingService#add() is passed an Observable value, IsLoadingService will take(1) from the value and subscribe to the results. We decide we want to trigger the same progress bar indicator that we just set up to indicate that a page is loading. Having completed the task of adding a "page loading" indicator during router navigation, now we want to display a loading indicator when we asynchronously fetch a list of users from a service.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |