Is there a way to refresh the page with anchor tab in same window in Aurelia

Is there a way to refresh a page having an anchor tab in the same window? When opening same link in a new window, complete page is being load while in same window only the linked div is loading.

1 Like

do you have some pseudo code?

Hello biogpon,
Here is the pseudo code.

Something Needs to refresh also
When i clicked on anchor link ,its only refresh "first" div content containing anchor link. But I need to refresh complete "parent" div.Second div is linked with other model in webapp which I need to refresh also when clicked on anchor. If i open the link in new window then the complete page is loaded but not in same window.My first div can have multiple anchors so I need to refresh same window after hash change with click event.I followed below two approaches. 1. Used below JQuery function reloadPageAfterHashChange(contactId){ $(window).on('hashchange',function(){ window.location.reload('true'); }) return true;//It must be return }

2.Using event aggregator (My favorite topic of Aurelia JS)
this.eventAggregator.publish(“event-name”,{type: this.contactId, id:‘street’});

And subscribe the published event in my desired model. It worked for me.