$ionicLoading not working on $scope

Try to use $ionicLoading directive, but cannot make it works.

I am showing the loading screen when someone clicked on the link while the link process to API, the loading screen will shown before its completed and return some data. Someone please tell me where i am doing it wrong.


angular.module('ionicApp.controllers', [])

.controller('DashCtrl', function($scope, $http, $ionicScrollDelegate, $ionicLoading) {
    $scope.show = function() {
        content: 'Loading',
        animation: 'fade-in',
        showBackdrop: true,
        maxWidth: 200,
        showDelay: 0

    $scope.hide = function(){

    //scope to show posts by specific user
    $scope.byUser = function(uid){
         var xhr = $http({
            method: 'post',
            url: 'http://www.mywebsite.com/api/lists.php?uid='+uid
             $scope.data = data.data;

You use your methods show() and hide() with $ionicLoading as an argument when you call them.
You defined your methods without argument.
Could you try calling your methods while removing the argument ?
($scope.show($ionicLoading) --> $scope.show())