lundi 31 mai 2021

is there any way to clear the current route view and do a new Transition for another router in ember?

In my ember app I have routes like this parent-route -> child-route -> leaf-route in my leaf route's willTransitionhook I will abort the transition based on some condition. also I'm storing the ember app object in global variable. so I can get router object from anywhere using this EmberApp.__container__.lookup("router:main"); and do transition using .transitionTo(another-parent-route). while I am on leaf-route's view, this transition won't work because its willTransition hook will abort the transition. So I need to clear my current router in router object and do fresh transition. is this possible? How can I achieve this? kindly suggest me any solution that help my case.




Aucun commentaire:

Enregistrer un commentaire