Accessing URL Path for Conditional Rendering in Neutrinos SSD

Hello everyone,

I’m building a reusable page component in “neutrinos SSD UI application” and need to conditionally display elements based on the current page’s URL.

What is the recommended approach for fetching the current URL path in the UI logic? Are there any specific nodes that should be used for this purpose?

Thanks!

2 Likes

Hello @Mohammed_Faizal_T ,
There is a node called Navigation Data Node available. In this node, you can retrieve the URL and store the required data, which can then be used elsewhere in your application.
Navigation Data

3 Likes

Hi @Mohammed_Faizal_T ,

You can access routes or URL Path by using of two nodes navigation data and navigation listener.
I will drop the documentation link for them below:
Navigation Listener
Navigation Data

Steps to conditional hide or show an element:
1. Assign your URL to a page variable so you can use it on your page.
2. Add a new Key & value property.
3. Key should be an *ngIf then a value your condition

3 Likes

Thanks, @sam @Simphiwe .

2 Likes