When clicking any anchor link which has a href='#'
, the Angular router path
{ path: '', component: NologinComponent, pathMatch: 'full' }
is matched, How should I handle these anchor links so that anchor with href='#'
stays on same page, i.e do nothing.
Example anchor tag
<a class="title-logo" href="#"><img src="/Content/Images/Image1.png"></a>
One More point to consider, i have used the <base href="/" />
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.