You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
The current isActive function does not work in this situation because the routes are different
The workaround it to create a child navigation under "production" but i feel like it is overkill (as i dont want to display the child page in the navigation (so i use the param visible = 0 ))
My solution would be to check that the page route is contained in the Matched route
Hello
Right now to check if a Mvc Page is active you guys check if
and that the parameters match
I was wondering if we could improve this behavior by checking first if the Page route is actually contained in the Matched Route
Lets take an example:
Router conf:
This assume that the child route project is under production
so route "production/project" is a child of "production"
Navigation Conf:
The current isActive function does not work in this situation because the routes are different
The workaround it to create a child navigation under "production" but i feel like it is overkill (as i dont want to display the child page in the navigation (so i use the param visible = 0 ))
My solution would be to check that the page route is contained in the Matched route
In my scenario It would check if "production/" is contained in the "production/project" (at the beginning of the string)
And make the Page active
so if you are viewing the site via the "production/project" route it will make all navigation set up to use the route "production" active
Please let me know if that make sense or if I am missing something that would make this solution incorrect
Thank you
The text was updated successfully, but these errors were encountered: