@dinaflies wrote:
I was wondering if it is possible to start a page with ion-loading element loading right from the start. I’ve tried to create the component at
ngOnInit
the after an if check andnavigateByUrl
method provided byrouter
, dismiss the loading element, but not only the ion-loading delay to be shown but also it doesn’t dismiss when navigation is completed. I also tried to makengOnInit
anasync
function to no avail.ngOnInit() { this.loadingCtrl.create({ message: 'Aguarde...', translucent: true, }).then(el => { el.present(); }); const userData = new AuthResponseData( this.route.snapshot.queryParamMap.get('localId'), parseInt(this.route.snapshot.queryParamMap.get('expiresIn')), this.route.snapshot.queryParamMap.get('accessToken'), this.route.snapshot.queryParamMap.get('refreshToken') ); this.authService.setUserData(userData); this.router.navigateByUrl('/usuario/painel').then( result => { this.loadingCtrl.dismiss(); } );
Any insights on this matter?
Posts: 1
Participants: 1