You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When navigating from ``/app/1/faqto/app/2/summary`, the observable emits before the ngDestroy of the current child component is triggered.
FAQ: subscribe at init, with id 1
change route with different id and different child path (summary in this case)
the subscribe callback from the FAQ component is triggered with the new id (2)
FAQ ng destroy is called
summary: subscribe at init, with id 2
This bug is similar to #9827 except that in my case I'm subscribing to parent params.
Expected behavior
The router should destroy children routes before emitting the param change for the parent
Reproduction of the problem http://plnkr.co/edit/hP3Mrjunjw4mFz4eYrtz?p=preview
check the console to see that it's getting the id before ngdestroy when navigating from summary to faq (and from faq to summary)
What is the motivation / use case for changing the behavior?
It leads to unpredictable behaviors and in my case to unnecessary server calls
I'm submitting a ...
Current behavior
I have a route with a
:id
param and this route has 2 children like this:In faq & summary I subscribe to the
:id
param from the parent route.When navigating from ``/app/1/faq
to
/app/2/summary`, the observable emits before the ngDestroy of the current child component is triggered.This bug is similar to #9827 except that in my case I'm subscribing to parent params.
Expected behavior
The router should destroy children routes before emitting the param change for the parent
Reproduction of the problem
http://plnkr.co/edit/hP3Mrjunjw4mFz4eYrtz?p=preview
check the console to see that it's getting the id before ngdestroy when navigating from summary to faq (and from faq to summary)
What is the motivation / use case for changing the behavior?
It leads to unpredictable behaviors and in my case to unnecessary server calls
cc @brandonroberts (who confirmed the bug with me)
The text was updated successfully, but these errors were encountered: