Loading Component - nativeElement - Uncaught promise

If you want to be sure that NavController has finished presenting your loading component you can move your fetchSchedule() call into the promise that this.nav.present() returns:

updateSchedule() {
    this.loading = Loading.create({
      content: "Loading Schedule"
    });

    this.nav.present(this.loading).then(() => {
      this.scheduleController.fetchSchedule().then(data => {
        this.groups = data;
        this.shownSessions = data.length;
        this.loading.dismiss();
      });
    });
  }
3 Likes