Ionic 2 Loading

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:


[ts] Property 'present' does not exist on type 'NavController'.

Is this way of doing things depreciated? How should I disable the page until a user action completes?


You have to present the Loading component using its object.

import { LoadingController } from 'ionic-angular';

constructor(private loadingCtrl: LoadingController) {}

let loading = this.loadingCtrl.create({
    content: 'Please wait...'

As from beta-11 changes are made with overlay components. They will be initialized using their own overlay controller.

Checkout for more info

1 Like