# $ionicLoadingConfig -\> changing the defaults

**URL:** <https://forum.ionicframework.com/t/ionicloadingconfig-changing-the-defaults/7490>\
**Category:** ionic-v1\
**Created:** [July 29, 2014, 8:35pm UTC](https://forum.ionicframework.com/t/ionicloadingconfig-changing-the-defaults/7490 "2014-07-29T20:35:31Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Norwill](https://avatars.discourse-cdn.com/v4/letter/n/c0e974/32.png) [@Norwill](https://forum.ionicframework.com/u/Norwill)\
**Post date:** [July 30, 2014, 5:17pm UTC](https://forum.ionicframework.com/t/ionicloadingconfig-changing-the-defaults/7490/6 "2014-07-30T17:17:09Z")

</div>

I take from here

> [@Http loading animation](http://forum.ionicframework.com/t/http-loading-animation/2152):
>
> Hello, want to use the Loading “[http://ionicframework.com/docs/angularjs/views/loading/](http://ionicframework.com/docs/angularjs/views/loading/)” overlay for an “$http.get(” call. I have a factory to get the json data and push it to an array .factory('NewsService', ['$http', function($http) { ... and a factory for the loader overlay .factory('LoaderService', function($rootScope, $ionicLoading) { return { show : function() { $rootScope.loading = $ionicLoading.show({ // The text to display in the loading indica…

This is mi code

```
Service
.factory('LoaderService', function($rootScope, $ionicLoading) {
    return {
        show : function() {

            $rootScope.loading = $ionicLoading.show({
                content: '<i class="icon ion-loading-c"></i>',
                animation: 'fade-in',
                showBackdrop: true,
                minWidth: 200,
                showDelay: 10
            });
        },

        hide : function(){
            $ionicLoading.hide();
        }
    }
});

Controller
.controller('MyCtrl', function($scope, $timeout, $rootScope, LoaderService, OtherService) {
    LoaderService.show();
    
	OtherService.getData(function(dataResponse) {
        $scope.data = dataResponse;
        LoaderService.hide();
    });
    
});

```

I use LoaderService in all controllers

Another approach can be see here:

> [Ionic Framework - The Cross-Platform App Development Leader](http://learn.ionicframework.com/formulas/loading-screen-with-interceptors/)

---

_[View the full topic](https://forum.ionicframework.com/t/ionicloadingconfig-changing-the-defaults/7490)._
