Skip to content

Commit cf8c9a1

Browse files
committed
Merge pull request #95 from yctay/patch-1
Fix for incorrect example code
2 parents f4b295a + 6863cd1 commit cf8c9a1

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

docs/angularjs/views/loading/index.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)