question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

get current route path with parameters

See original GitHub issue

Is there a way to get the current route path (not url path) from the writable store?

Right now, the value stored is of format {path, query, hash}, where the path value contains the current url path, e.g. /accounts/12345

I am looking for the route path value, e.g. /accounts/:account

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
sallabencommented, Dec 13, 2020

I bit the bullet and switched to declarative style. I will let you know if that prevents me from doing anything but thank you anyway!

1reaction
AlexxNBcommented, Dec 11, 2020

I didn’t add this to the router output. But it is easy to add. But what is use case? Just interesting =)

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the best way to get current route params in Angular 6 ...
Since you want the current route params, instead of activatedRoute.snapshot , you should be subscribing to activatedRoute.params .
Read more >
How To Get Route Path Parameters In Non-Routed Angular ...
First, we can try to do exactly the same as before and inject the ActivatedRoute into the AppComponent . The route will actually...
Read more >
How to get current route URL in Angular
Steps to get current route URL in Angular. 1. Import Router,NavigationEnd from angular/router and inject in the constructor. 2.
Read more >
How to Get URL Parameters with JavaScript - SitePoint
Learn how to parse query string parameters and get their values in JavaScript. Use the results for tracking referrals, autocomplete, ...
Read more >
Get Current Route Parameter In Blade Template - Biegalski LLC
In this quick snippet, you will learn how to get the current route's parameter in your views using the blade templating engine!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found