docs(): update angular usage

This commit is contained in:
mhartington
2018-05-17 16:17:37 -04:00
parent e6638e7922
commit 1b4a94dc17
10 changed files with 116 additions and 71 deletions

View File

@ -5,30 +5,28 @@ import { LoadingController } from '@ionic/angular';
@Component({
selector: 'loading-example',
templateUrl: 'loading-example.html',
styleUrls: ['./loading-example.css'],
styleUrls: ['./loading-example.css']
})
export class LoadingExample {
constructor(public loadingController: LoadingController) {}
presentLoading() {
const loading = this.loadingController.create({
async presentLoading() {
const loading = await this.loadingController.create({
message: 'Hellooo',
duration: 2000
});
loading.present();
return await loading.present();
}
presentLoadingWithOptions() {
const loading = this.loadingController.create({
const loading = await this.loadingController.create({
spinner: 'hide',
duration: 5000,
content: 'Please wait...',
translucent: true,
cssClass: 'custom-class custom-loading'
});
loading.present();
return await loading.present();
}
}
```