mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27:41 +08:00
docs(): update angular usage
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user