Skip to content

Instantly share code, notes, and snippets.

@surendrans
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save surendrans/b1c5d00c63e1d0a0ce7d to your computer and use it in GitHub Desktop.
Save surendrans/b1c5d00c63e1d0a0ce7d to your computer and use it in GitHub Desktop.
ionicLoading.js
angular.module('starter.services', [])
.factory('loading', ['$ionicLoading', function($ionicLoading){
return {
show: function() {
$ionicLoading.show({
template: '<i class="icon ion-loading-a"></i> loading...',
animation: 'fade-in',
showBackdrop: true,
maxWidth: 200,
showDelay: 0
});
},
hide: function() {
$ionicLoading.hide();
}
}
}])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment