@ssd532 wrote:
Hi, I am facing problem with
$ionicLoading
.$ionicLoading.hide()
is not working inside.then
. The error on console says "$ionicLoading.hide is not a function
" I have verified that there is no typo. And I can safely say that $ionicLoading is correctly injected as $ionicLoading.show() is working.$scope.signin = function() { var credentials = { ph_no: $scope.ph_no, password: $scope.password }; $ionicLoading.show({ template: '<ion-spinner icon="bubbles"></ion-spinner><br/>Loading...', delay: 100 }); $auth.login(credentials).then(function(data) { // If login is successful, redirect to the offers state $ionicLoading.hide(); $state.go('app.offerslist', {}); }, function(error) { console.log("promise error"); }); };
It's my signin function which gets called when user submits signin form. Please help. Thanks you.
Posts: 3
Participants: 2