Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70612

$state.go is now Async

$
0
0

@candoa84 wrote:

Every since ios9 update my $state.go is not working sync. I have this piece of code in my ionic application

$state.go('layout.categories');
window.location.reload();

Simple right well the state.go transition do a full page refresh.
The problem I'm having is that $state.go doesn't finish before my window.location.reload triggers.

I found this work around.

$state.go('layout.categories');
setTimeout(function () {
  window.location.reload();
}, 20)

But as you can see it is really messy and it looks really weird. I was wondering if any of you guys encounter this problem if so, do you have any tips for a rookie.

Thanks.

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 70612

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>