title: Angular navigation when selecting the browser back button
body: <p>How would you add a function such as this to several different components when navigating with angular router: "if the browser back button is selected, navigate back to this specified component, while not saving any of the users information that has been input".  I currently have this code but I want it to be updated to angular.</p>
  
  <pre><code>platformBrowserDynamic().bootstrapModule(AppModule).then(ref =&gt; {
  if (window['ngRef']) {
  window['ngRef'].destry(); }
  window['ngRef'] = ref;
  }).catch(err =&gt; console.error(err));
  </code></pre>