How to go back to the previous previous roughing in angular 4

Viewed 1304

How to navigate back twice in Angular?

I have a case user can navigate to view A and then to view B and then to view C and from view C the user can click on the browser back but instead of navigate to view B I want to navigate to view A.

Is there any option to do this in Angular? I'm using angular router.

1 Answers

Try this :

parent.history.go(-2);

Or

window.history.go(-2);
Related