Importing 'LoadingController' no ionic 3

1

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)
     });
  });  
}}
    
asked by anonymous 06.09.2017 / 21:37

1 answer

1

The imports continues the same, but I think you need to update these libraries as well. Take a look at your package.json and check their version.

    
11.10.2017 / 16:02