I updated my ionic from version 2 to version 3, and some plugins like 'LoadingController' and 'Platform' stopped working, generating the error Can not find name 'LoadingController'.
I did not find in doc how to import them now.
Follow my code:
import { LoadingController, Platform } from 'ionic-angular'
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
providers: [ ProfileService, AlertService ]
})
export class AppComponent {
constructor(private router: Router,
public loadingCtrl: LoadingController,
private activatedRoute: ActivatedRoute,
private loginService: LoginService,
private profileService: ProfileService,
private _alertService: AlertService,
private platform: Platform ) {
router.events.subscribe((data) => {
this.path = data.url.substr(1);
})
this.getUserName();
this.platform.ready().then(() => {
this.platform.registerBackButtonAction(() => {
history.go(-1)
});
});
}}