I can't believe that the problem was with the sequence in which parameters were passed for services injection. I had following in the code
.controller('AuthController', ['$auth', '$scope', '$ionicPopup, '$ionicLoading',
function($auth, $scope, $ionicLoading, $ionicPopup) {
..... code .......
}
The position of $ionicLoading
and $ionicPopup
was not correct which messed up the things. Correcting the positions solved the problem, but I am still not getting why $ionicLoading.show()
was working.
Thanks Class for your help.