How to determine if route is active? #2448
Unanswered
martinszeltins
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have routes like
users/new
andusers/list
andusers/edit
and I want to write the logic that if the route starts withusers
then I want to returntrue
for isRouteActive.But the problem is that I cannot write
route.path.startsWith('/users')
because it won't work for localized routes like/es/users/
Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions