Hi, I am in the process of updating my Ionic 2 project to Ionic >=3.
One of the changes seems to be what argument type NavController now no longer takes a Component argument…
abstract setRoot(pageOrViewCtrl: Page | string | ViewController, params?: any, opts?: NavOptions, done?: Function): Promise<any>;`
I have an existing method that returned a Component
as follows…
public async getInitialPageForLoginState(: Promise<Component> {
...
With a call like the following
let page = await this.appStartupService.getInitialPageForLoginState()`
this.navCtrl.setRoot(page);
Which now gets a type error. Rather than change the return type to Promise<any>
, I would like to change it to Promise<Page>
but cannot find where to import Page from.
Does any one know how to import this?
Thanks in advance.