title: how to get Previous Route in Angular 4 app
body: <p>I have 2 routes defined as homepage and page1. I am going to page1 from homepage by <strong>this.router.navigation(with some queryparams)</strong>.Now once i go to page1, i have some filters,which i can add to get particular data from api.Once i add those filter i change the page1 url by <strong>this.router.navigation(with some queryparams)</strong>.After adding/deleting multiple filter , my url changes many times..Now i have a back button which upon click should navigate me to Homepage.</p>
  
  <p>1.I have tried using history.back/location.back.But i have to click multiple times.(i see that navigationstart gets called multiple times)</p>
  
  <p>2.i have tried a solution using rxjs pairwise
  But i am not able to get the previous page(homepage).
  3.This is just a situation.Basically i have to get the route of the preious page.<strong>I can't hard code the path in backFunc,Because this has to be generic for all of my other similar types of pages.I can come to page1 from any other page, and should be able to go back to the respective page</strong>.
  Am i missing something very obvious , does Angular 4 provides any way to tackle this?</p>