Hi All,
I am looking at this documentation which shows how to present a loading indicator when the page is busy.
However, I get the following Typescript error:
this.nav.present(loading);
[ts] Property 'present' does not exist on type 'NavController'.
any
Is this way of doing things depreciated? How should I disable the page until a user action completes?
Thanks
vaibsVB
2
You have to present the Loading
component using its object.
i.e.
import { LoadingController } from 'ionic-angular';
constructor(private loadingCtrl: LoadingController) {}
let loading = this.loadingCtrl.create({
content: 'Please wait...'
});
loading.present();
As from beta-11
changes are made with overlay components
. They will be initialized using their own overlay controller
.
Checkout for more info https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#overlays
1 Like