Describe 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
Describe 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 aroutesobject 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 buildAlternatives 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
Implemented in 3.0.0-next, so this can be closed:
$app/manifest(#16372) exportsroutes, and it's importable in app code, not only in a service worker, which the docs don't show.routesis currently a superset of your real routes: every directory undersrc/routesgets an entry, including ones with no+pageor+server. Same missing filter as #14847, not a gap in this request.