Iron-Router: stay on previous route, during 'onStop'

Hi Guys…

Here is the thing. For example i’m on route A, and then i’m clicked on the link to route B.
But…before i’ll go to route B, i want to check something and if everything is good, only then proceed to route B.

Basically i want to stay on the same route during some operations(including async) within ‘onStop’ hook execution.

Now, as fast as onStop returns iron-router changing the route to route B, and i’m understand this is how the things work. On server i can use fibers/future wait() But, how i can handle such situation on client in this case?

thank you!

Did you every get this working?

Yeah, i have one solution, migrating now to FlowRouter…still painful but starting to love it :wink:
If seriously - the only solution was - move the logic out of the IR…

What’s the solution I also need to do something like this?

Mate, it’s depends on what you trying to solve.
In my case i’ve put logic on template level, hide the data by default, check if i have a proper state and then show data or send user to another place.

What’s you case? Can you explain?