Loding process issue when api call

Hi all,
I would have follow this URL https://www.freakyjolly.com/tag/ionic-4-show-loader-spinner-progress-bar-on-http-requests-example/ to achieve loading process for every HTTP call.

But it not work properly. console say ERROR Error: “Uncaught (in promise): overlay does not exist” and also loader does not close…

Any one to know the solution please help me and also please give a suggestion to use progress bar instead of loader.

https://angular.io/guide/http#listening-to-progress-events