z-Index of loader

Hello,

I have made a modal view. that is showing a search bar.
The data for the search bar Comes from a web Service.

So I would Show a loader.

The Problem is that the loader is behind the modal view.

How can I set the z-Index of the loader to bring it to the front?

Any Suggestion?

Thank you.

Ok. I found a solution using only a spinner element

In the html

<ion-spinner *ngIf="showSpinner == true"></ion-spinner>

In the css:

ion-spinner {
  display: block;
  margin: auto;
}

In the ts:

public showSpinner: boolean = false;

Change the showSpinner hide or Show the spinner.