title: Angular 2, handle anchor links with href='#'
body: <p>When clicking any anchor link which has a <code>href='#'</code>, the Angular router path </p>
  
  <pre><code>{ path: '', component: NologinComponent, pathMatch: 'full' }
  </code></pre>
  
  <p>is matched, How should I handle these anchor links so that anchor with <code>href='#'</code> stays on same page, i.e do nothing. </p>
  
  <p>Example anchor tag</p>
  
  <p><code>&lt;a class="title-logo" href="#"&gt;&lt;img src="/Content/Images/Image1.png"&gt;&lt;/a&gt;</code></p>
  
  <p>One More point to consider, i have used the  <code>&lt;base href="/" /&gt;</code> in the layout page so that on refresh angular stays on current page and look for the resources from "/" not from inside the current component.</p>