Get URL of current page

My use case is to configure a page with a route with the primary component. When that component loads, I need to get the URL value I set in the configuration. I have been looking at system.perspective.getProjectInfo() and system.perspective.getSessionInfo(). The issue with the .getProjectinfo() is that returns all the pages configurations, but I want to know which one is the current one. And the .getSessionInfo() returns all the active sessions in the gateway.

Is there a way to get just the current page URL?

Bind that to a view custom property. Read that property on change.

The URL I set in the Page Config was, let me say /test2. When I use either self.page.props.path or create a root.CUSTOM.url and create a binding to it with page.props.path, both scenarios are returning / instead of /test2.

Can you show the page configuration for this view? Is test2 a parameter value that you are passing in?


Yes, the Page URL is /test2. So my guess is that when this view loads, self.page.props.path should return /test2, similarly with /test1.