A
A
Alex Art2019-10-29 13:20:31
Angular
Alex Art, 2019-10-29 13:20:31

How to hide the "back" button in angular cli if there is nowhere to go back?

Good day! I have a project where I would like to show the back button to the user only if he can navigate back. Is it possible to somehow check through the Angular router whether it is possible to go back or not? Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shvets, 2019-10-29
@Xuxicheta

https://developer.mozilla.org/ru/docs/Web/API/Hist...
And the router has a navigationId, a kind of navigation counter.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question