3

I'm trying to implement sliding navigation using angular version 4.

<a href="#SlideTo" > Click </a> 
<div id="SlideTo"> This is div </div> 

so , when anchor tag clicked it is realoading the complete page and rediercted to

http://localhost:4200#SlideTo. any one can help

1 Answers1

2

I have been through this problem before, and i solved it using this line.

<a [routerLink]="['./']" fragment="SlideTo"> Click </a> 
AlameerAshraf
  • 872
  • 1
  • 13
  • 23