Navigate form root(app.component)


#1

hi ,

I am trying to get permission in app.component.ts when user give all the permission then only i want to display home page.

WHAT’s HAPPENING

User grants all the permission’s. Then i have to again restart the app then page are loaded

const storage = this.androidPermissions.requestPermission( this.androidPermissions.PERMISSION.READ_EXTERNAL_STORAGE );

		const storageWrite = this.androidPermissions.requestPermission( this.androidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE );
		
		const phone = this.androidPermissions.requestPermission( this.androidPermissions.PERMISSION.READ_PHONE_STATE );
		
		Promise.all([storage,storageWrite,phone]).then(value => {
				/* this.navCtrl.setRoot(LoginPage); */
				console.log("in app LOgin Promise all");
				 this.app.getRootNav().setRoot(LoginPage);

		});

This is what i am trying to do . This written in app.component