How to use new LoadingController


#1

Hi, I’m looking for the Loading API document (I think the old url is http://ionicframework.com/docs/v2/api/components/loading/Loading/) but it’s not there anymore.
Now I see the new LoadingController (http://ionicframework.com/docs/v2/api/components/loading/LoadingController/) but it’s not exist in ionic beta 10. So how can I use the new LoadingController ?

Thanks


#2

I’m running into the same problem.


#3

Here’s the API docs link for Beta10

http://ionicframework.com/docs/v2/2.0.0-beta.10/api/components/loading/Loading/


#4

Just pointing out that the link to the new Loading Controller is for the upcoming release, not the stable beta 10 release. Use the link @rajpatangay posted :point_up:


#5

Thanks, I hope that loadingcontroller will release soon.


#6

I continue with this problem, someone managed to solve?


#7

problem resolved: https://github.com/driftyco/ionic/blob/master/CHANGELOG.md


#8

You have to use the Loading component using its own controller i.e. LoadingController.
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.
From beta-11 the overlay components i.e. alert, modal, loading and popover having their own controller and now they are separated from NavController. So there is no need of navController instance to create overlay components.

Check out the CHANGELOG of BREAKING CHANGES for overlay components in beta-11 https://github.com/driftyco/ionic/blob/master/CHANGELOG.md#overlays


#9

My package.json
{"@angular/common": “2.0.0-rc.3”,
"@angular/compiler": “2.0.0-rc.3”,
"@angular/core": “2.0.0-rc.3”,
"@angular/http": “2.0.0-rc.3”,
"@angular/platform-browser": “2.0.0-rc.3”,
"@angular/platform-browser-dynamic": “2.0.0-rc.3”,
"@types/google-maps": “^3.1.28”,
“es6-shim”: “^0.35.0”,
“ionic-angular”: “2.0.0-beta.10”,
“ionic-native”: “1.2.4”,
“ionicons”: “3.0.0”,
“reflect-metadata”: “^0.1.3”,
“rxjs”: “5.0.0-beta.6”,
“zone.js”: “^0.6.12”}

why still i can not import LoadController FROM IONIC-ANGULAR


#10

it should be LoadingController
import { LoadingController } from ‘ionic-angular’;
check the link of docs
http://ionicframework.com/docs/v2/components/#loading

if this does not work please update ionic to latest version as it seems you are using 2.0.0-beta.10[quote=“vks_gautam1, post:9, topic:57206”]
“ionic-angular”: “2.0.0-beta.10”,
[/quote]


#11

thnks i worked on beta10 version. because updating of newer version created lot of error in my existing project


#12

Its working in my project which is in rc3
btw you should consider updating as plenty of changes has been done to make ionic2 better. please refer to the changelog


#13

thanks .i tried to update NPM but it is not showing any effect.
i am using visual studio 2015. version of node and npm is
node -v
v6.9.1

npm -v
4.0.2

“dependencies”: {
"@angular/common": “2.0.0-rc.3”,
"@angular/compiler": “2.0.0-rc.3”,
"@angular/core": “2.0.0-rc.3”,
"@angular/platform-browser": “2.0.0-rc.3”,
"@angular/platform-browser-dynamic": “2.0.0-rc.3”,
"@angular/http": “2.0.0-rc.3”,
“es6-shim”: “^0.35.0”,
“ionic-angular”: “2.0.0-beta.10”,
“ionic-native”: “^1.2.4”,
“ionicons”: “3.0.0”,
“reflect-metadata”: “^0.1.3”,
“rxjs”: “5.0.0-beta.6”,
“zone.js”: “^0.6.12”
},