A
A
Andrey2017-02-02 12:43:51
Angular
Andrey, 2017-02-02 12:43:51

Angular 2: How to manage animation when changing pages (routing)?

The official documentation has an example of animation during routing. You can hang one type of animation on the entrance (: enter) and exit (: lieve) from the page.
OK. When the user gets to the page, they "come" from the top, and when they go to the next one, they go down.
But if the user decides to return to the previous page, she will not "arrive" from below - where she left and where she is expected to be seen - but again "arrive" from above.
Idea such: to hang up on event (wheel) change of the page. The user turns the wheel down - the next pages are loaded, up - the previous ones.
I have some ideas on how to manage navigation when routing, but they are somehow complicated: the point is to store data in some service about where the user is coming from, from the previous page or from the next one, and change the animation accordingly.
Perhaps there is some normal solution "out of the box"?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question