I changed my route without changing the url by using the skipLocationChange attribute like below.
<a [routerLink]="['/articledetail']" skipLocationChange><h4>{{article.HeadLine}}</h4></a>
But it goes to previous route while I am refreshing the page.
Then I used ngIf to check a variable value by setting value of it in a method which is called while clicking on anchor tag,.But here also,my contents are previous contents after refreshing the page
How can I change the content of a page without changing the url while clicking an anchor tag in angular 2.
Thanks
replaceState. Maybe try thereplaceUrlproperty e.g:this.router.navigate(["articledetail"], {replaceUrl:false});