Timing problem synchronizing Electron and Ionic

Hi,
I’m executing an Ionic app into an Electron application.
The authentication takes place on the Electron side.
Then the authentication data are passed to the Ionic app using the ipc.
The Ionic app shows data retrieved from a remote server using some Rest web services and the authentication data passed by Electron.
All this stuff works, but there is a timing problem.

When the Ionic pages are shown the data from Electron have not yet arrived, they arrive a bit later.
So I’d like to show a LoadingPage until these data arrive.
When Ionic gets the data from Electron, the functionthis.settings.isUserLogged() returns true.

How can I change the root of the app when this function returns true?

In the file app.components.ts I have:

export class MyApp {

	@ViewChild(Nav) nav: Nav;
	rootPage:any = LoadingPage;
  
	constructor(public platform: Platform,
			  public statusBar: StatusBar,
			  public splashScreen: SplashScreen,
			  public settings: SettingsProvider...)
			{....}
              
	platform.ready().then(() => {
		statusBar.styleDefault();
		splashScreen.hide();

		<when this.settings.isUserLogged()==true>{
			this.nav.setRoot(TabsPage);
		}
	}
  
}

So, the question is: how can I implement “<when this.settings.isUserLogged()==true>” ?.

cld

I’ve solved using a Behaviour, as describer in this post.