If you want to use loader spinner to show while HTTP call is in progress or in some other time-consuming activity. You can use ionic’s loading component, shown here
We can use same loading component as service in a convenient way.
Let’s create loadingService.ts as below.
Then inject loadingService in your page or where ever you want to use it, as you can see in below homePage.ts