Ionic 1.3 error related to Ionic View LifeCycle
Short description of the problem:
beforeLeave, leave and afterLeave don't work with Ionic 1.3, using in this case abstact state and nested views
What behavior are you expecting?
Call these events in the respective order
Regards, Nicholls
Hi @jdnichollsc,
Can you provide a code pen showing your issue?
Thanks, Dan
Yes Sir @danbucholtz, see please: http://codepen.io/jdnichollsc/pen/VaGgVm?editors=1010
Thanks in advance, Nicholls
Part of the problem is that you're using version 1.0.0 in the codepen http://code.ionicframework.com/1.0.0/. If I change it to 1.3.0, the events fire beforeEnter > enter > afterEnter. The leave events don't fire in the example.
@dually8, @jdnichollsc,
Yep. I noticed that as well. I am updating some code related to life cycle events as we speak. Next week we should hopefully have a fix out in 1.3.1.
@dually8 if you change the navigation from Gallery to Home doesn't work... with 1.0.0 or 1.3.0
This will be fixed in the nightly build tonight.
http://code.ionicframework.com/#nightly
Please test and let me know if this resolves your issue. We added a ton of automated testing and fixed a ton of issues around life cycle events in the past few days.
Thanks, Dan
The events don't fire for me since 1.3.1 I had to revert back to 1.3.0 for it to work.
Anybody else experienced it ?
Hi @lucasbeef,
Can you provide a codepen? Is there an exception in the console or anything. Please let me know. I wrote a lot of tests and updated logic for that in 1.3.1. Please let me know what you're seeing so we can get it resolved.
Thanks, Dan
Now works for me, thanks Sir @danbucholtz! :dancers: Link updated: http://codepen.io/jdnichollsc/full/VaGgVm/
@danbucholtz Well, it's a mystery for me, I have basically the same code as in the codepen jdnichollsc provided. It works on 1.3.0 but not on 1.3.1.
I have no exception, nothing in the console either. The events simply don't trigger. I'd like to give you more intel, but I don't know where to look
What is your codepen link? To review your code :)
Ok, I got it working ! I found out that the events wouldn't trigger because my template wasn't encapsulated in an ion-view. It used to work that way.
Sorry about that :confused: And thank you ! It's really cool that you keep on improving and supporting V1 !
Yes, thanks Ionic team for support Ionic 1.x! :dancers: