I have outer routes: /posts
and /about
. /posts
route has nested routes: /
and /pages/:pageNumber
.
When navigating between nested routes (/
and /pages/:pageNumber
) animations work well. But when navigating to /about
nested route immediately disappears.
animateChild()
doesn't help. In parent router component animation:
transition(':leave', [
query('@*', animateChild()),
animate('/*some easing*/', style({/*some styles*/}))
])
This causes error query("@*") returned zero elements.
. So nested route is removed immediately, parent component can't see it.
Angular version: 4.2.2