@@ -22,40 +22,37 @@ To trigger Loading in your code, use the `Loading` service in your angular contr
2222
2323``` javascript
2424
25- angular .module (' test ' , [' ionic' ])
25+ angular .module (' LoadingApp ' , [' ionic' ])
2626
27- .controller (function ( $scope , [ ' Loading' , Loading ) {
27+ .controller (' LoadingCtrl ' , [ ' $scope' , ' Loading' , function ( $scope , Loading ) {
2828
2929 // Trigger the loading indicator
3030 $scope .show = function () {
3131
3232 // Show the loading overlay and text
3333 $scope .loading = Loading .show ({
3434
35- $scope .loadingIndicator = Loading .show ({
35+ // The text to display in the loading indicator
36+ content: ' Loading' ,
3637
37- // The text to display in the loading indicator
38- content : ' Loading ' ,
38+ // The animation to use
39+ animation : ' fade-in ' ,
3940
40- // The animation to use
41- animation : ' fade-in ' ,
41+ // Will a dark overlay or backdrop cover the entire view
42+ showBackdrop : true ,
4243
43- // Will a dark overlay or backdrop cover the entire view
44- showBackdrop: true ,
44+ // The maximum width of the loading indicator
45+ // Text will be wrapped if longer than maxWidth
46+ maxWidth: 200 ,
4547
46- // The maximum width of the loading indicator
47- // Text will be wrapped if longer than maxWidth
48- maxWidth: 200 ,
49-
50- // The delay in showing the indicator
51- showDelay: 500
52- });
48+ // The delay in showing the indicator
49+ showDelay: 500
5350 });
5451 };
5552
5653 // Hide the loading indicator
5754 $scope .hide = function (){
5855 $scope .loading .hide ();
59- }
56+ };
6057}]);
61- ```
58+ ```
0 commit comments