Skip to Content

Fragment opens up and then closes immediately on navigation to another view

Sep 14, 2017 at 12:08 PM


avatar image


I have a fragment which opens up in 2nd view. I tried to open it in onInit, onBeforeRendering,onAfterRendering and onRouteMatched after navigating from 1st view. The fragement does open for few seconds and then closes itself.

What i observed during debugging is that, on click of navigate button,

Fragment was getting opened first(fragment open call in onRouteMatch of 2nd view) and then the app was getting navigated to 2nd view.

I did find a workaround, which was to add 0 millisecond jquery delay call and opening fragment inside jquery delay function.

I wanted to know if there is another way to handle this kind of situation.

Please do post your suggestions.



10 |10000 characters needed characters left characters exceeded

Adding it in onAfterRendering function it didn't worked???

* Please Login or Register to Answer, Follow or Comment.

0 Answers