title: Navigation is not working on clicking back button in angular
body: <p>Here is my code and I am trying to navigate to '/employee-profile/empId' while pressing browser back button, but this code doesn't work properly </p>
  
  <p>I have tried using PlatformLocation here.</p>
  
  <pre><code> this.location.onPopState(() =&gt; {
      console.log('pressed back!');
      this.router.navigate(['/employee-profile/empId']);
    });
  </code></pre>