I have a component to which the user can reach from various pages. When the user clicks an OK button in this component, he should be redirected to the previous page ie. the page from where he came to this component.
I came across window.history.back(); and this.router.navigate( '../' ).
Also, what is the difference between window.history.back(); and this.router.navigate( '../' )
I also want to understand what's the difference between this.location.back() and window.history.back().