How to properly change an internal URL with filter:left-menu.links.create.result

Hello -
I’m making a plugin that uses the « filter:left-menu.links.create.result » hook provided by PeerTube. You can view the repo at:

I’m having an issue where when a user clicks a link that points to a different internal URL, the page reload is not triggered. The source code defines the following parameters for a link:

type MenuLink = {
  icon: GlobalIconName
  iconClass?: string
  label: string
  path?: string
  url?: string
  query?: Params
  isPrimaryButton?: boolean // default false
  ngClass?: string
}

So in this context, a link that defines a « path » and a « query » to build a custom internal URL does not trigger a page reload on click. If the base « path » in the link changes, then the page reloads - but if just the « path » is the same, and just the « query » changes, the page does not reload. Hopefully that makes sense.

I’ve tried forcing a page reload by adding a « window.location.reload(); » onClick event, but that does nothing.

I’m sure there is some kind of internal URL processing done by PeerTube to handle this « internal » URL change that I’m not accessing, I simply can not find out what it is. Can someone point me in the right direction?

I think it has something to do with using the Angular Router Link, but I’m not sure what I need to import, or how I need to change my path/query parameters to properly use the angular router link.

Can you paste your instance URL with the link in the menu so I can reproduce?

If I click one of my « Category » links while on a different « directory » page, the link works, but if I click between categories, the browser does nothing other than just update the URL in the address bar. It never reloads to show the new content.

Example:
/videos/subscriptions → /videos/browse?categoryOneOf=20 works
/videos/browse?categoryOneOf=20 → /videos/browse?categoryOneOf=19 doesn’t work