Last active
April 21, 2023 08:59
-
-
Save alexdiliberto/9948140 to your computer and use it in GitHub Desktop.
List all Ember route paths. (Just paste this in the console of your favorite Ember app)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// NOTE: `AppName` is simply your PascalCase application name (`modulePrefix` key from `../config/environment.js`) | |
window.AppName.__container__.lookup('service:router')._router._routerMicrolib.recognizer.names; |
@backspace Thanks, yea this is a 5 year old gist...I updated it 👍
I can't get my application name to be recognised ... very strange ... anyway expanding on what backspace said here's another approach which steps around that problem (works in Ember Inspector 3.11.0).
-
Use Ember Inspector and select 'Container',
-
select 'route',
-
click on $E at top of Container types list
-
Enter '$E.router._routerMicrolib.recognizer.names;' into console.
Do you have ember-export-application-global
? It’s turned off by default in a production environment.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Ember 3.4, at least, you can do this, as mentioned here:
But using the Ember Inspector makes this much easier!