AlertController not working if using in the Service instead of individual pages

I have created one generic dbService which will handle api request from all the module/pages so in that service i want to use AlertController and LoadingController but its not working.

Can we use our Loading Controller and AlertController in custom service like in DataFactory

I want to display generic message alert or display Loader in my service so no need to add AlertController and LoadingController in each page.