1

I'm creating dynamic route like this in menu

<li *ngFor="let item of menu">
   <a *ngSwitchCase="'link'" routerLinkActive="active" [routerLink]="item.routerLink">    
   <span class="pr-2">{{item.title}}  </span></a>
</li>

issue is when i click on the same link second time i cannot call that route i have to click on other menu item then click on old one to work

I have this route in navigation_menu.component and right side component the content is loaded.

Any solution to fix this issue. Thanks

user3653474
  • 3,393
  • 6
  • 49
  • 135

1 Answers1

0

Using Angular, when you click on a link that should load a component. The Framework will do it. On the other hand, if the component has already been loaded and you click on a link that even to the same component, then Angular will think that there is no point in reloading the page when we have just done it. You must surely find another logic such as: If we are in a given page and we click to go to the same page, then let's do another process, such as "Reload the page", "Retrieve from new data" etc... :)

Ricardo Machado
  • 787
  • 1
  • 8
  • 16