Programmatically get all routes
See original GitHub issueDescribe the problem
It is not a frustration, it is a feature request -
but in a project I would like to progammatically generate menu items using the routes available. This way, whenever I have new routes introduced, I immediately have them in the menu (with a bit of chances to show in a nice way).
Describe the proposed solution
I would like to see, as a suggestion that $app-navigation
’s api get extended with a routes
object that has a list or tree structure the represents the routes as currently present within the app. Then I can use that object to generate my menu or whatever feature I want to build
Alternatives considered
Just create a json file or static js object in the project that has all the menu items.
Importance
nice to have
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to get a list of all routes in ASP.NET Core? - Stack Overflow
Insert code routes.MapRouteAnalyzer("/routes"); into Startup.cs as follows. ... Then you can access url of http://..../routes to view all route informations on ...
Read more >How to list all routes in an ASP.NET Core application
In this post, I describe how to list all routes of an ASP.NET Core application using EndpointDataSource.
Read more >Programmatically list all routes (/paths) from within a rails app.
Programmatically list all routes (/paths) from within a rails app. - rails_route_recognizer.rb.
Read more >How to get a list of registered route paths in Laravel?
Using getRoutes() by using the Route class in web.php. The getRoutes() will return routeCollection that will hold all the route lists. use ...
Read more >Routing and Action Selection in ASP.NET Web API
Action Selection · Create a list of all actions on the controller that match the HTTP request method. · If the route dictionary...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Not exactly a duplicate, but it feels like this could be folded into #1142.
Hi @larrybotha and @benmccann
Thanks for both pointers.
I will use this which is sufficint for my use case -giving an array of menu items for the app