# $ionicLoading.hide() not working

**URL:** <https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052>\
**Category:** ionic-v1\
**Created:** [March 20, 2014, 1:00pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052 "2014-03-20T13:00:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![kfir](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kfir](https://forum.ionicframework.com/u/kfir)\
**Post date:** [March 20, 2014, 1:00pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/1 "2014-03-20T13:00:30Z")

</div>

Hey,  
I’m trying to remove the loading in this way `$ionicLoading.hide ()`  
I get an error

```
Uncaught TypeError: Object # <Object> has no method 'hide'

```

Thank you!

---

<div class="post-metadata">

**Author:** ![Sat](https://avatars.discourse-cdn.com/v4/letter/s/22d042/32.png) [@Sat](https://forum.ionicframework.com/u/Sat)\
**Post date:** [March 20, 2014, 1:09pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/2 "2014-03-20T13:09:02Z")

</div>

How you are creating the Loading Object ?

For example creating a Loading Object

// Show the loading overlay and text  
$scope.loading = $ionicLoading.show({

```
        // The text to display in the loading indicator
        content: '<i class=" ion-loading-c"></i> '+ message,

        // The animation to use
        animation: 'fade-in',

        // Will a dark overlay or backdrop cover the entire view
        showBackdrop: true,

        // The maximum width of the loading indicator
        // Text will be wrapped if longer than maxWidth
        maxWidth: 200,

        // The delay in showing the indicator
        showDelay: 500
    });

```

Then for Hiding call `$scope.loading.hide();`

Regards,  
Sat

---

<div class="post-metadata">

**Author:** ![kfir](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kfir](https://forum.ionicframework.com/u/kfir)\
**Post date:** [March 20, 2014, 1:22pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/3 "2014-03-20T13:22:18Z")

</div>

My code:

```
$ionicLoading.show({

  // The text to display in the loading indicator
  content: $scope.TextLoading,

  // The animation to use
  animation: 'fade-in',

  // Will a dark overlay or backdrop cover the entire view
  showBackdrop: true,

  // The maximum width of the loading indicator
  // Text will be wrapped if longer than maxWidth
  maxWidth: 200,

  // The delay in showing the indicator
  showDelay: 100
});

$scope.loading.hide();

```

not work for me

---

<div class="post-metadata">

**Author:** ![32teeths](https://avatars.discourse-cdn.com/v4/letter/3/b487fb/32.png) [@32teeths](https://forum.ionicframework.com/u/32teeths)\
**Post date:** [March 20, 2014, 1:56pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/4 "2014-03-20T13:56:44Z")

</div>

First initialize the $ionicLoading object to a $scope variable. You are not doing that I see

Do ,

```
$scope.loading =$ionicLoading.show({<props>});

```

Then do,

`$scope.loading.hide();`

---

<div class="post-metadata">

**Author:** ![kfir](https://avatars.discourse-cdn.com/v4/letter/k/9f8e36/32.png) [@kfir](https://forum.ionicframework.com/u/kfir)\
**Post date:** [March 20, 2014, 2:04pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/5 "2014-03-20T14:04:16Z")

</div>

I did not notice it!  
It works Thank you very much!

---

<div class="post-metadata">

**Author:** ![mike](https://avatars.discourse-cdn.com/v4/letter/m/58f4c7/32.png) [@mike](https://forum.ionicframework.com/u/mike)\
**Post date:** [May 10, 2014, 1:05pm UTC](https://forum.ionicframework.com/t/ionicloading-hide-not-working/2052/6 "2014-05-10T13:05:18Z")

</div>

documentation should be updated since it shows a different example using an unimplemented $ionicLoading.hide() function
