-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathionic-loader-module.js
37 lines (30 loc) · 1.14 KB
/
ionic-loader-module.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
angular.module('ionic-loader-module', ['ionic'])
.factory('LoaderModule', function($rootScope, $ionicLoading) {
// Trigger the loading indicator
return {
show : function() { //code from the ionic framework doc
// Show the loading overlay and text
$rootScope.loading = $ionicLoading.show({
// templateUrl : 'app/views/loader_spin_template.html',
template: '<div id="loader-rotation-spin"></div>',
// The text to display in the loading indicator
content: '',
// The animation to use
animation: 'fade-in',
// Will a dark overlay or backdrop cover the entire view
showBackdrop: true,
// The maximum width of the loading indicator
// Text will be wrapped if longer than maxWidth
maxWidth: 200,
// The delay in showing the indicator
showDelay: 500
});
},
hide : function(){
//nighlty
$ionicLoading.hide();
//nighlty
// $rootScope.loading.hide();
}
};
});