docs(): update examples and usage

This commit is contained in:
mhartington
2018-05-31 10:56:02 -04:00
parent 89a7d169e9
commit 5ad35ccc00
25 changed files with 370 additions and 225 deletions

View File

@@ -28,7 +28,7 @@ export class LoadingController implements OverlayController {
removeLastOverlay(this.loadings);
}
/*
/**
* Create a loading overlay with loading options.
*/
@Method()
@@ -36,7 +36,7 @@ export class LoadingController implements OverlayController {
return createOverlay(this.doc.createElement('ion-loading'), opts);
}
/*
/**
* Dismiss the open loading overlay.
*/
@Method()
@@ -44,7 +44,7 @@ export class LoadingController implements OverlayController {
return dismissOverlay(data, role, this.loadings, loadingId);
}
/*
/**
* Get the most recently opened loading overlay.
*/
@Method()

View File

@@ -3,19 +3,6 @@
Loading controllers programmatically control the loading component. Loadings can be created and dismissed from the loading controller. View the [Loading](../../loading/Loading) documentation for a full list of options to pass upon creation.
```javascript
async function presentLoading() {
const loadingController = document.querySelector('ion-loading-controller');
await loadingController.componentOnReady();
const loadingElement = await loadingController.create({
content: 'Please wait...',
spinner: 'crescent',
duration: 2000
});
return await loadingElement.present();
}
```
<!-- Auto Generated Below -->

View File

@@ -0,0 +1,13 @@
```javascript
async function presentLoading() {
const loadingController = document.querySelector('ion-loading-controller');
await loadingController.componentOnReady();
const loadingElement = await loadingController.create({
content: 'Please wait...',
spinner: 'crescent',
duration: 2000
});
return await loadingElement.present();
}
```