# z-Index of loader

**URL:** <https://forum.ionicframework.com/t/z-index-of-loader/81899>\
**Category:** ionic-v3\
**Created:** [March 5, 2017, 10:44pm UTC](https://forum.ionicframework.com/t/z-index-of-loader/81899 "2017-03-05T22:44:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jacktoolsnet](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jacktoolsnet/32/107318_2.png) [@Jacktoolsnet](https://forum.ionicframework.com/u/Jacktoolsnet)\
**Post date:** [March 5, 2017, 10:44pm UTC](https://forum.ionicframework.com/t/z-index-of-loader/81899/1 "2017-03-05T22:44:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Jacktoolsnet](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/jacktoolsnet/32/107318_2.png) [@Jacktoolsnet](https://forum.ionicframework.com/u/Jacktoolsnet)\
**Post date:** [March 6, 2017, 7:29pm UTC](https://forum.ionicframework.com/t/z-index-of-loader/81899/2 "2017-03-06T19:29:23Z")

</div>

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.
